Settin spacing between Y-axis

3 Ansichten (letzte 30 Tage)
Paul Purdon
Paul Purdon am 29 Mai 2020
Kommentiert: Ameer Hamza am 29 Mai 2020
Hi,
My x axis goes from 0 to 20 and my why from 0 to 100,
I would like both my axes to be the same length, so when my x axis increases by 1, my Y increases by 5.
How would I do that?

Antworten (1)

Ameer Hamza
Ameer Hamza am 29 Mai 2020
Bearbeitet: Ameer Hamza am 29 Mai 2020
Use daspect()
plot(rand(1,10)*10);
daspect([1 5 1]) % 1 unit of x-axis is equal to 5 units of y-axis
Alternatively, try
plot(rand(1,10)*10);
axis square
  2 Kommentare
Rik
Rik am 29 Mai 2020
Great minds think alike? ;)
Ameer Hamza
Ameer Hamza am 29 Mai 2020
Thanks, Rik :)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Graphics Objects 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