how can I scale the subplots ?

Hi,
I want to scale the subplots. It should be scaled so that anyone can easily follow a point from top to bottom such as the figure attached here (Disp=1 in all subplots and small image means small force. Large image means large force in the figure)
thanks in advance

 Accepted Answer

Star Strider
Star Strider on 2 Apr 2021
I am not certain what result you want.
One option is the axis function. Use the same limits on each subplot so that they all have the same limits.

4 Comments

thanks for reply. How can i draw a line which can cut all subplots in the same point (top to bottom) as it is shown in the image?
here it is the script.
thanks in advance
figure;
subplot(3,1,1);
%%%some work here for x and y
plot(x,y)
subplot(3,1,2);
%%%some work here for x and y
plot(x,y)
subplot(3,1,3);
%%%some work here for x and y
plot(x,y)
My pleasure!
Two options:
xline(xval,'k')
using xline, or:
hold on
plot([1 1]*xval, ylim, 'k')
hold off
where ‘xval’ is the x-axis location to draw the vertical line.
So, since that appears to be 1 here:
xline(1,'k')
or:
hold on
plot([1 1], ylim, 'k')
hold off
Both of these automatically scale to the y-axis limits, so that does not have to be specifically coded.
THANKS again.
As always, my pleasure!

Sign in to comment.

More Answers (0)

Products

Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!