how to set a aspect ratio in the plot

12 visualizaciones (últimos 30 días)
ali altammar
ali altammar el 10 de Mayo de 2020
Comentada: Ameer Hamza el 10 de Mayo de 2020
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 comentario
Tommy
Tommy el 10 de Mayo de 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;

Iniciar sesión para comentar.

Respuestas (2)

Star Strider
Star Strider el 10 de Mayo de 2020
Use the axis function.
  2 comentarios
ali altammar
ali altammar el 10 de Mayo de 2020
Thank you for you answer
but I want the scale to be from 0.01 .1 1 10 100
Star Strider
Star Strider el 10 de Mayo de 2020
I did not understand what you were asking.
Use the semilogy function for your plot. It will plot the y-axis logarithmically.

Iniciar sesión para comentar.


Ameer Hamza
Ameer Hamza el 10 de Mayo de 2020
Editada: Ameer Hamza el 10 de Mayo de 2020
  2 comentarios
ali altammar
ali altammar el 10 de Mayo de 2020
This is for graph ratio right?
I want the plot , y axis to be 0.01 .1 1 10 100
Ameer Hamza
Ameer Hamza el 10 de Mayo de 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')

Iniciar sesión para comentar.

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by