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

조회 수: 7 (최근 30일)
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.

답변 (1개)

dpb
dpb 2022년 5월 8일
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.

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by