![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/272510/image.png)
thick values i log scale
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi all,
I would like to obtain (using the loglog in order to plot the graph) a thick line on the abscissa thick with the value represented as shown in the figure attached. In other words I would like to show the thick value in power of ten, showing the extremes also if they are value like 500, I would like to show them in the form 5*10^2.
I post this after a research, I have already seen this https://it.mathworks.com/matlabcentral/answers/359447-how-changing-the-loglog-scale-x-and-y-axis , . I aapplied it using the following, but I would like to show all the value in power of ten.
loglog(x, y)
xlabel ('Frequency (Hz)')
ylabel ('tke amplitude (m^2/s)')
xlim([10^-1,200])
ylim([10^-3,2])
grid on
tickpos = [10^-1 10^0 10^1 10^2 2*10^2];
set(gca, 'XTick', tickpos)
And I have already seen this https://it.mathworks.com/matlabcentral/answers/27951-format-axes-tick-labels-in-log-scale but I cannot show correclty value like 5*10^2.
Can you help me?
댓글 수: 0
답변 (1개)
Kavya Vuriti
2020년 2월 19일
Hi,
You could try modifying your code as shown below:
loglog(x, y)
xlabel ('Frequency (Hz)')
ylabel ('tke amplitude (m^2/s)')
xlim([10^-1,200])
ylim([10^-3,2])
grid on
xticks([10^-1 10^0 10^1 10^2 2*10^2]);
xticklabels({'10^-1', '10^0', '10^1', '10^2', '2*10^2'});
This would give plot as shown below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/272510/image.png)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!