how to set a aspect ratio in the plot
Show older comments
How can I make the Y axies similer to the below graph
I tried to use ylim but i want the limit from 0.01 .1 1 10 100
I'm using loglog plotting

1 Comment
Tommy
on 10 May 2020
loglog should use a log scale for the y axis. Do you mean that you want to change the y tick labels to no longer use 10^n formatting?
ax = axes;
loglog(ax, logspace(1,8,10), logspace(-2,2,10));
ax.YTickLabel = ax.YTick;

Answers (2)
Star Strider
on 10 May 2020
0 votes
2 Comments
ali altammar
on 10 May 2020
Star Strider
on 10 May 2020
I did not understand what you were asking.
Ameer Hamza
on 10 May 2020
Edited: Ameer Hamza
on 10 May 2020
0 votes
See daspect(): https://www.mathworks.com/help/releases/R2020a/matlab/ref/daspect.html and pbaspect(): https://www.mathworks.com/help/releases/R2020a/matlab/ref/pbaspect.html to control the relative length of axis.
2 Comments
ali altammar
on 10 May 2020
Ameer Hamza
on 10 May 2020
This is for the aspect ratio between the x and y-axis. If you want to change the scale of one axis, then you can either use semilogy to plot the curve or set the scale after the creation of axes
set(gca, 'YScale', 'log')
Categories
Find more on 2-D and 3-D Plots 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!