Coordinate Control
The Calling format of the axis function is:
Axis ([xmin xmax ymin Ymax zmin zmax])
The Axis functions are rich and common formats include:
Axis equal: the vertical and horizontal axes adopt a long scale.
Axis square: generate a square coordinate system (rectangle by default ).
Axis Auto: use the default settings.
Axis off: cancel the axis.
Axis on: displays the axis.
Use the grid command to control the gridlines of coordinates. The grid on/off command controls whether to draw or not grid lines. Grid commands without parameters are switched between the two States.
Add Borders to coordinates and use the box command to control them. The box on/off command controls whether to add or not to the border line. Box commands without parameters are switched between the two States.
Xlabel (X axis description)
Ylabel (Y axis description)
Text (X, Y, graphic description)
Set function: for example, if you want X coordinates to be displayed from 1 to 100, the scale is 20; y coordinates to be displayed from 1 to 10, and the scale is 2
Set (GCA, 'xticket', [], 'yticket', []);
Set curve style
MATLAB provides some plotting options for determining the line type, color, and data point marking of the drawn curve, which can be used in combination. For example, "B-." indicates a blue dash, and "Y: D" indicates a yellow dotted line and marks a data point with a diamond. When the option is omitted, Matlab specifies that the line type is solid, and the color is in sequence based on the curve.
To set a curve style, add the drawing option in the plot function. The call format is as follows:
Plot (x1, Y1, option 1, X2, Y2, option 2 ,..., XN, YN, option n)
The detailed feature characters are described as follows:
Color and Color Symbols
B blue
G green
R red
C cayn cyan
M magenta red
Y yellow
K black
W white
Linear symbols
-Solid line
: Dotted line
-. Dashes
-- Double dashes
Description of data point mark symbols
. Solid point
O hollow circle
X forks
+ Cross
* Mi characters
S Square
D Diamond
V lower triangle
^ Upper triangle
<Left triangle
> Right triangle
P pentagram
H hex hexagonal star