Clippings with the same height in MATLAB

I have something like

subplot(2,2,1) plot(y1) subplot(2,2,3) plot(y2) subplot(2,2,[2 4]) plot(y3) 

The last graph depicting y3 does not have the same height as the graphs y1 + y2 . How can i fix this?

Hugh Nolan is right. In general, there should be no problems. However, the boxes appear to be automatically compressed after plotting.

How can I make boxplot the same height as the subnets side by side?

+4
source share
3 answers

The ylim function allows you to set and set the limits of the y axis so you can:

 subplot(2,2,1) plot(y1) yl1=ylim; subplot(2,2,3) plot(y2) ylim(yl1); subplot(2,2,[2 4]) plot(y3) ylim(yl1); 
+1
source

You can manually specify the position, width and height of each subheading using subplot('Position',[left bottom width height]) instead of the usual subplot command. See the Mathworks Page for more information.

0
source

Have you tried axial / axial functions? This sets the xlim and ylim graphics.

0
source

Source: https://habr.com/ru/post/1491087/


All Articles