How to scale a graph

392 次查看(过去 30 天)
Jose Grimaldo
Jose Grimaldo 2020-3-6
My graph is the at the bottom one (second graph), but it supposed to look like the one above it (first graph). The values (x,y) are the same. Is there a way to scale it like the first graph?
My code
figure(1)
plot(Idx,Deflection,'-b','linewidth',1);

回答(2 个)

Andy
Andy 2020-3-9
Use this immediately after the plot command to specify how you want the axis to plot.
ylim([-19 0])

Srivardhan Gadila
Srivardhan Gadila 2020-3-13
Refer to Specify Axis Limits and specify the limits for X and Y axis.

类别

Help CenterFile Exchange 中查找有关 Graph and Network Algorithms 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by