Subplots of subplots (maybe using subaxis)

6 views (last 30 days)
Sim
Sim on 11 May 2022
Commented: Sim on 12 May 2022
I am using the beast exchange file, which default example,
load('Nile.mat') % annual streamflow of the Nile River startin from year 1871
out = beast(Nile,'start', 1871); % trend and seasonality of the time-series
H = plotbeast(out)
produces the following subplots:
H =
1×8 Axes array:
Axes Axes Axes Axes Axes Axes Axes Axes
Now, I would like to create subplots of those subplots, produced by beast, possibly using the subaxis function (but I am open to other tools for subplots!). Unfortunately, the following attempt does not work:
load('Nile.mat')
out = beast(Nile,'start', 1871);
% subplot of subplots?
for i = 1 : 6
subax(i) = subaxis(4,2,i);
H = plotbeast(out)
end
My goal would be to get something like this:
How can I get it ? Do you have any suggestion / idea?
  1 Comment
Sim
Sim on 11 May 2022
hey guys...any idea? I am bit sinking with this plot :-) :-)

Sign in to comment.

Answers (1)

the cyclist
the cyclist on 12 May 2022
I would try the native tiledlayout function to make the subplots. I've never used beast, so I'm not sure if there are any weird incompatibilities.
  1 Comment
Sim
Sim on 12 May 2022
thanks @the cyclist :) But, unfortunately, it does not work...
load('Nile.mat')
out = beast(Nile,'start', 1871);
tiledlayout(2,1);
% Tile 1
nexttile
plotbeast(out)
% Tile 2
nexttile
plotbeast(out)

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!