필터 지우기
필터 지우기

semilogx plot, scaling problem.

조회 수: 1 (최근 30일)
adrooney
adrooney 2014년 10월 12일
답변: Image Analyst 2014년 10월 12일
When I use the semilogx syntax with X axis to be scaled.
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?

채택된 답변

Image Analyst
Image Analyst 2014년 10월 12일
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]);

추가 답변 (1개)

the cyclist
the cyclist 2014년 10월 12일
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.
  댓글 수: 1
adrooney
adrooney 2014년 10월 12일
Thank u for the answer. What I meant was instead of going till 1000 right side of the axis. I want the upperlimit to be till 100 and the lower limit starting from 0.01 instead of 10^0 or 1.
And thanks for the reverse command it worked. But how to set the limits on the x axis or how to change those 10^0 to 10^3 values to 0.01 to 100. Thanks once again

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by