Settin spacing between Y-axis
3 views (last 30 days)
Show older comments
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?
0 Comments
Answers (1)
Ameer Hamza
on 29 May 2020
Edited: Ameer Hamza
on 29 May 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 Comments
See Also
Categories
Find more on Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!