フィルターのクリア

Log scale differs between tiledlayout plots

9 ビュー (過去 30 日間)
Sophia
Sophia 2023 年 8 月 18 日
コメント済み: Voss 2023 年 8 月 20 日
Hi,
I would like to include a log y axis on the first four tiles (A-D) of my plot. Tile E-H do not need a log y axis. The log y axis should include both positive and negative values. The log axis works perfectly when plotting one boxplot tile (e.g. A only), but when using the tile function to plot all boxplots, the logs no longer display negative values on the y axis or are simply not a log axis anymore (C & D).

採用された回答

Voss
Voss 2023 年 8 月 18 日
It may appear that plots C and D are not log y-axis, but that's only because MATLAB doesn't draw the small ticks under certain conditions (depending on the axes height and ylimits). They are still log-scale, they just don't show the small tick marks between the decades.
For example, with this figure size (height: 1000 pixels) plots C and D do not show the small ticks:
figure('Position',[1 1 1000 1000])
boxplots_logaxis
But with this figure size (height: 1500 pixels) plots C and D do show the small ticks (so they look like how you expect a log-scale axis should look):
figure('Position',[1 1 1000 1500])
boxplots_logaxis
Conclusion: make the figure taller in order to see the log axes ticks.
You're not going to be able to include negative values on a log-scale axis.
  2 件のコメント
Sophia
Sophia 2023 年 8 月 20 日
Amazing, thank-you!
Voss
Voss 2023 年 8 月 20 日
You're welcome!

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by