semilogx plot, scaling problem.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
adrooney
el 12 de Oct. de 2014
Respondida: Image Analyst
el 12 de Oct. de 2014
When I use the semilogx syntax with X axis to be scaled.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/145692/image.jpeg)
I used semilogx(parameter). I get the result like in the picture attached, but I intended to 100 , 10 , 1 , 0.1 , 0.01 micrometers in the X axis. Can I manually adjust the scale. If so how?
0 comentarios
Respuesta aceptada
Image Analyst
el 12 de Oct. de 2014
Use xlim() to set the right and left edges of the graph. If you want 1 on the left and 100 as the max value on the right (which means you will crop off much of the data):
xlim([1, 100]);
0 comentarios
Más respuestas (1)
the cyclist
el 12 de Oct. de 2014
I'm not sure I understand your intent.
Do you mean that you wanted the plotted data to go from larger to smaller values? If so, maybe you want
set(gca,'XDir','reverse')
Do you mean that you wanted the x-axis labeled with whole numbers, rather than exponential notation? If so, maybe you want
set(gca,'XTick',[1 10 100 100])
set(gca,'XTickLabel',{'1','10','100','1000'})
I'm not sure why you mention 0.1 or 0.01, because none of your X data seems to be in that range.
Please clarify by editing your question, or adding a comment to my answer.
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!