pcolor - Numeric Ruler -> limits and scale commands

13 ビュー (過去 30 日間)
Christopher McCausland
Christopher McCausland 2022 年 3 月 24 日
Hi,
I have a cwt figure plotted with pcolor. I can open the property inspector on the figure and manually change the "Scale" property to log. I would expect the command to set the y axis to log scale be something along the lines of;
figure()
h = pcolor(1:size(wt,2),f,db(abs(wt)));
h.EdgeColor = 'none';
h.YAxis.Scale = 'log';
and https://uk.mathworks.com/help/matlab/ref/matlab.graphics.axis.decorator.numericruler-properties.html seems to agree with me, however I get an error that "Scale" is not a property class for primitive surfaces. Fair enough, I am guessing the name in the propery inspector is just a generic placeholder, could someone point me in the correct direction for what the correct property name is for Yaxis scale with pcolor?

採用された回答

Simon Chan
Simon Chan 2022 年 3 月 24 日
Try this:
C =[1 2 3;4 5 6; 7 8 9];
pcolor(C);
ax=gca;
ax.YScale='log';
  1 件のコメント
Christopher McCausland
Christopher McCausland 2022 年 3 月 24 日
Hi Simon,
Works a charm, thank you!
Christopher

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by