Effacer les filtres
Effacer les filtres

Log scale differs between tiledlayout plots

9 vues (au cours des 30 derniers jours)
Sophia
Sophia le 18 Août 2023
Commenté : Voss le 20 Août 2023
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).

Réponse acceptée

Voss
Voss le 18 Août 2023
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 commentaires
Sophia
Sophia le 20 Août 2023
Amazing, thank-you!
Voss
Voss le 20 Août 2023
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Log Plots dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by