Current location - Education and Training Encyclopedia - Educational Knowledge - How to merge two diagrams in MATLAB?
How to merge two diagrams in MATLAB?
1) A set of data is x, y1; The other group is X, Y2;

You can plot (x, y 1, x, y2);

2) In addition, if a double coordinate diagram is needed,

Plotyy(x, y 1, x, y2) can be used;

3) multiple subgraphs are needed,

You can use subplots (2, 1,1); plot(x,y 1);

Subplots (2, 1, 2); plot(x,y2);

As for the post-processing of graphics, the tools provided by the system can be used in the drawn charts.

It's easy to change fonts, colors and labels. This is a graphical way.