StackedPlots: Problem by moving Legend out of plot and expand distance between single charts

8 vues (au cours des 30 derniers jours)
Hello,
I use stackedplot to generate 4 plots. I want to move the Legend out of the plot, because it covers data points
ax_090 = findobj(plot_090.NodeChildren, 'Type','Legend');
set(ax_090,'Location','northeastoutside');
doesn't work.
My other Problem is the horizontal distance between the single charts. I can't find Properties to make the distance bigger.

Réponses (1)

dpb
dpb le 8 Mai 2022
The stacked plot is pretty much "what you see is what you get" -- not much is user-variable about the layout -- in particular, for some bizarre reason the legend positions when the plot is stacked plot do not have the 'outsidexxx' options; as you've noted, the 'outside' prefix is ignored.
As is the penchant recently, TMW seems to think they know best and have really neutered many of these lately-introduced specialty graphs.
If you want some more flexibility, you'll probably have to revert to the tiledlayout or the venerable subplot option instead.
Sad, but afaict, true...I couldn't see any way to make the changes you're looking for; particularly with respect to the legend.

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by