How to scale a graph

391 Ansichten (letzte 30 Tage)
Jose Grimaldo
Jose Grimaldo am 6 Mär. 2020
Beantwortet: Srivardhan Gadila am 13 Mär. 2020
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);

Antworten (2)

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

Srivardhan Gadila
Srivardhan Gadila am 13 Mär. 2020
Refer to Specify Axis Limits and specify the limits for X and Y axis.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by