Plotting Multiple Graphs In The Same Plot Using the plot...
Transcript of Plotting Multiple Graphs In The Same Plot Using the plot...
![Page 1: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/1.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer Programming Lecture 13Computer Programming Dr.Moayed Almobaied
Plotting Multiple Graphs In The Same Plot
Using the plot Command
![Page 2: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/2.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied Lecture 13
![Page 3: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/3.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied Lecture 13
![Page 4: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/4.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied
Using the hold on and hold off Commands
Lecture 13
![Page 5: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/5.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied
Using the line Command
Lecture 13
![Page 6: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/6.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied Lecture 13
![Page 7: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/7.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied
FORMATTING A PLOT
The xlabel and ylabel commands:
The title command:
Lecture 13
![Page 8: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/8.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied
The text command:
The legend command:
Lecture 13
![Page 9: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/9.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied
The text in the string that is included in the command
and is displayed when the command is executed can
be formatted. The formatting can be used to define
the font, size, position (superscript, subscript), style
(italic, bold, etc.), and color of the characters, the
color of the background, and many other details of
the display.
Lecture 13
![Page 10: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/10.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied Lecture 13
![Page 11: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/11.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied Lecture 13
![Page 12: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/12.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied
Greek characters:
Lecture 13
![Page 13: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/13.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied
Formatting of the text that is displayed by the xlabel, ylabel,
title, and text commands can also be done by adding optional
PropertyName and PropertyValue arguments following the
string inside the command.
Lecture 13
![Page 14: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/14.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied Lecture 13
![Page 15: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/15.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied
The axis command:
When the plot (x, y) command is executed, MATLAB creates
axes with limits that are based on the minimum and maximum
values of the elements of x and y.
Lecture 13
![Page 16: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/16.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied Lecture 13
![Page 17: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/17.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied Lecture 13
![Page 18: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/18.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied
Formatting a Plot Using the Plot Editor
Lecture 13
![Page 19: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/19.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied
Plots with Logarithmic Axes
Lecture 13
![Page 20: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/20.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied
Notes for plots with logarithmic axes:
• The number zero cannot be plotted on a log scale
• Negative numbers cannot be plotted on log scalesLecture 13
![Page 21: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/21.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied
PLOTS WITH ERROR BARS
Lecture 13
![Page 22: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/22.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied Lecture 13
![Page 23: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/23.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied
PLOTS WITH SPECIAL GRAPHICS
Lecture 13
![Page 24: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/24.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied Lecture 13
![Page 25: Plotting Multiple Graphs In The Same Plot Using the plot ...site.iugaza.edu.ps/ahdrouss/files/2018/10/Presentation11.pdf · Plotting Multiple Graphs In The Same Plot Using the plot](https://reader033.fdocuments.us/reader033/viewer/2022042306/5ed25cc7f5f0a840990253e8/html5/thumbnails/25.jpg)
Islamic University of GazaFaculty of EngineeringCivil Engineering Department
Computer ProgrammingComputer Programming Dr.Moayed Almobaied Lecture 13