1. Set the width of the drawing line
Set (Haxis, ' linewidth ', 1.0); ----This is the SET function, ' LineWidth ' is the axis line width property, whose value defaults to 0.5, which can be changed to 1.0.
2, adjust the lower limit of the axis
Set (Haxis, ' Xlim ', [2 20]); Set (Haxis, ' Ylim ', [2]),---Adjust the upper and lower bounds of the axis. Z-axis, that same set (Haxis, ' Zlim ', [Zmin, percent Zmax])
3. Adjust the callout number on the axis
Set (Haxis, ' XTick ', 2:1:20); Set (Haxis, ' Ytick ', 2:1:20);----is to adjust the numbers on the axis, 2:1:20 means starting from 2, marking every 1, until 20. Note that here the 2, 20 best and the above corresponding Xlim, ylim the maximum minimum value of the same.
4. The Linetype and color properties provided in MATLAB:
such as: Plot (x1,y1, ' R '), indicate, draw a graphic with a solid red line
Linear |
Description |
Tag character |
Description |
Color |
Description |
- |
Solid Line (default) |
+ |
Plus character |
R |
Red |
-- |
Double Dash |
O |
Hollow Circle |
G |
Green |
: |
Dashed |
* |
Asterisk |
B |
Blue |
:. |
Dot Dash |
. |
Solid Circle |
C |
Cyan Green |
|
|
X |
Fork Symbol |
M |
Magenta |
|
|
S |
Square |
Y |
Yellow |
|
|
D |
Rhombic |
K |
Black |
|
|
^ |
Upper Triangle |
W |
White |
|
|
V |
Lower Triangle |
|
|
|
|
> |
Right triangle |
|
|
|
|
< |
Left Triangle |
|
|
|
|
P |
Pentagram |
|
|
|
|
H |
Hexagon |
|
5, graphics title, axis labeling, graphical description of the settings
Chart name callout available: title (' xx diagram ')
Axis ([0,22,0,3]),---Display range: X-axis from 0-22, y-axis shown from 0-3.
Xlabel (' Voltage (v) '), Ylabel (' current (a) ') indicates the voltage (v) under the X-axis, and "current (a)" next to the y-axis.
Legend (' A curve ', ' B curve ', ' C curve ') is used to illustrate the description of the curve in the diagram, and the sequence is the same as plot (x1,y1,x2,y2,x3,y3) curves 1, 2, 3.
Using the MATLAB plot to draw several uses (turn)