MATLAB Answers

How to scale a graph

397 views (last 30 days)
Jose Grimaldo
Jose Grimaldo on 6 Mar 2020
Answered: Srivardhan Gadila on 13 Mar 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

  1 Comment

Walter Roberson
Walter Roberson on 6 Mar 2020
axis equal

Sign in to comment.

Answers (2)

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


Sign in to comment.

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


Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by