- Firstly, I learnt how to make 2D plot by using the command
- plot(independent variable, dependent variable, ' the property')
- Then I went through the properties of plotting (colour and line tribe); there are many properties for graph drawing such 'k' for black colour line and '*' for drawing star line.
Example
The Result
- Then I learnt how to make the graph grid --> by adding 'grid' command after the 'plot' command
- Then I went through and I understood the 'hold on, hold off and close all' commands
- hold on & hold off --> to show the last figure or not
- close off --> to close any figure was opened
- After that I learnt about 'subplot' command and the different between 'subplot' and 'plot' subplot(number of rows, number of column, the number of the matrix which occupy the figure)
Example for subplot
The Result
- Then I learnt how to name or label the graph Axis's and title the graph
- For labeling X Axis we use the command --> xlabel('The of the axis')
- For labeling Y Axis we use the command --> xlabel('The of the axis')
- For titling the graph we use the command --> title('The Title of the graph')
Example for Label and Title the Graph
The Result
- Actually, I went through many related to 2D plotting and I won't be able to mention them all, but I can tell before I ended this post; one the most significant which I learnt during this week that I learnt the basic command of plotting 3D graph
- The most important two commands in plotting 3D are 'meshgrid' and 'mesh' (which work as plot command in 2D)
Here an Example for 3D Plotting
The Result
No comments:
Post a Comment