Sunday, October 2, 2022
HomeMatlabGet your subplots the best way you need it with subplotHelper »...

Get your subplots the best way you need it with subplotHelper » File Alternate Decide of the Week


Do you know that subplot can be utilized to create non-uniformly distributed axes? For instance,

subplot(3,3,1), textual content(0.5,0.5,“1”,“FontSize”,24,“Shade”,“purple”)

subplot(3,3,2), textual content(0.5,0.5,“2”,“FontSize”,24,“Shade”,“purple”)

subplot(3,3,3), textual content(0.5,0.5,“3”,“FontSize”,24,“Shade”,“purple”)

subplot(3,3,[4 7]), textual content([.5 .5],[.25 .75],[“7” “4”],“FontSize”,24,“Shade”,“purple”)

subplot(3,3,[5 9]), textual content([.25 .25 .75 .75],[.25 .75 .25 .75],[“8” “5” “9” “6”],“FontSize”,24,“Shade”,“purple”)

As you possibly can see, the third enter argument to subplot generally is a vector that specifies the corners of the oblong area. It isn’t too difficult, however it does require some thought to determine the suitable parameters.

subplotHelper helps you get these parameters by permitting you to interactively choose the structure. This is the software in motion.

Very good!

Try tiledlayout (launched in R2019b)

On a associated notice, for those who’re utilizing R2019b or later, take a look at the brand new perform tiledlayout and nexttile. These offer you a bit extra management and extra capabilities for axes structure over subplot. One in every of my favourite options of tiledlayout is the “circulation” possibility that routinely adjusts the structure based mostly on the determine dimension and form.

In fact, tiledlayout can have non-uniform distribution, similar to with subplot.

Feedback

Give subplotHelper a attempt, and tell us what you assume right here.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments