using the Axes function to draw the diagram in MATLAB drawing
Sometimes in order to detail the details, you need to draw a small map on a larger axis to enlarge the local to illustrate the results.
This can be achieved by calling the axes function.
The following is an example of how the function is used by drawing a y=1/(t-3) curve.
The procedure is as follows:
CLC; Clear;close all;
T=linspace (0,6,300);% The overall discrete coordinate value of the generated curve T
T1=linspace (2.8,3.2,300); The local discrete coordinate value of the generated curve T1
Y=sin (1./[t-3]);% of the overall discrete function value y of the generated curve
Y1=sin (1./[t1-3]); % local discrete function value of the generated curve y1
figure;% Generate a new graphics window
Plot (t,y); axis (' equal '); % plot overall graph
Axes (' Position ', [0.18,0.62,0.28,0.25]); % generate sub-diagram
Plot (t1,y1); % plot local graph
Xlim ([min (T1), Max (T1)]); % Set Axis range
axes The parameter description after the function, with the horizontal ordinate range as the datum:
Example 0.18 is the normalized horizontal position of the lower left corner of the sub-graph:
(The horizontal axis of the position-the starting value of the horizontal axis)/Horizontal range = 0.18,
Similarly, 0.62 is the normalized ordinate position in the lower-left corner of the sub-graph:
(Ordinate-ordinate start value for the position)/ordinate range = 0.62,
0.28 is the normalized width of the sub-graph, 0.25 is the normalized height of the sub-graph, the specific calculation process is the same as
Using the axes function to draw the diagram in MATLAB drawing