Graphics    

Example - Specifying Ticks and Tick Labels

You can adjust the axis tick-mark locations and the labels appearing at each tick mark. For example, this plot of the sine function relabels the x-axis with more meaningful values.

These commands (xlabel, ylabel, title, text) add axis labels and draw an arrow that points to the location on the graph where y = sin(-pi/4).

Setting Line Properties on an Existing Plot

Change the line color to purple by first finding the handle of the line object created by plot and then setting its Color property. Use findobj and the fact that MATLAB creates a blue line (RGB value [0 0 1]) by default. In the same statement, set the LineWidth property to 2 points.

The Greek symbols are created using TeX character sequences.


  Axis Limits and Ticks Setting Aspect Ratio