How to modify range of loglog scale?

26 ビュー (過去 30 日間)
K3iTH
K3iTH 2021 年 10 月 5 日
コメント済み: Mathieu NOE 2021 年 10 月 25 日
Hi all,
I am plotting my graph use loglog(x,y) and my setting for the log plot is shown below, but that does not provide the output I need as shown as in the figures. I can obtained the log scale for y-axis easily but I have problem to get the log scale for x-axis with a step of 5.
Thank you for you helps. I truly appreciate it.
loglog(x,y);
set(gca,'XLim',[0 30]);
set(gca,'YLim',[1e-1 1e1]);
set(gca,'XTick',10.^(0:1));
set(gca,'YTick',10.^(-1:1));
set(gca,'XMinorTick','on','YMinorTick','on')

回答 (1 件)

Mathieu NOE
Mathieu NOE 2021 年 10 月 5 日
hello
suggestion below :
x = (0.1:0.1:50);
y = 0.1+0.1*exp(0.1*x);
xmax= 30;
dx = 5;
loglog(x,y);
set(gca,'XLim',[1e-1 xmax]);
set(gca,'YLim',[1e-1 1e1]);
set(gca,'XTick',[1e-1 1 (dx:dx:xmax)]);
set(gca,'YTick',10.^(-1:1));
set(gca,'XMinorTick','on','YMinorTick','on')
  2 件のコメント
Mathieu NOE
Mathieu NOE 2021 年 10 月 12 日
Hi
problem solved ?
Mathieu NOE
Mathieu NOE 2021 年 10 月 25 日
hello again
problem solved ?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by