How changing the loglog scale x and y axis?
4 ビュー (過去 30 日間)
古いコメントを表示
I need to represent numbers from 0.5 to 50 (0.5 5 50) instead of 1 10 100(standard log log scale) is it possible? how can i do?
0 件のコメント
採用された回答
Walter Roberson
2017 年 10 月 3 日
x = sort( rand(1,40)*49.5 + 0.5 );
y = x.*abs(sin(x));
loglog(x,y)
xlim([0.5 50])
ylim([0.5 50])
nticks = 5;
tickpos = round( logspace(log10(0.5),log10(50), nticks) );
set(gca, 'XTick', tickpos, 'YTick', tickpos)
2 件のコメント
Walter Roberson
2017 年 10 月 3 日
tickpos = [0.5 5 50];
set(gca, 'XTick', tickpos, 'YTick', tickpos)
その他の回答 (1 件)
David J. Mack
2017 年 10 月 3 日
編集済み: David J. Mack
2017 年 10 月 3 日
semilogy(x,y);
If you have to use loglog, use the 'XScale'-Property instead:
loglog(x,y);
set(gca,'XScale','linear');
In both cases you can set the x-tick & the x-axis limit, using:
set(gca, 'XTick',[0.5 5:5:50], 'XLim',[0.5 50]);
Greetings, David
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Red についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!