[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Subplot size
From: |
Francesco Potortì |
Subject: |
Re: Subplot size |
Date: |
Thu, 27 Feb 2020 10:23:16 +0100 |
Henk Borsje:
>>I would like to plot multiple subplots in a single figure. Because of the
>>large number of graphs I want to suppress all labels from the horizontal
>>axis, except the bottom one, and reduce the space between the graphs.
>>According to the documentation the 'position' parameter in the subplot can
>>be used to define location and size of each subplot.
Francesco Potortì:
>By trial and error I managed to get to this (works on Octave 5.2.0 on
>Linux with fltk):
>
>m = 8;
>d = rand(100,m);
>rnge = 1:100;
>figure (1), clf
>for i = 1:m
> ah = subplot(m,1,i);
> plot(rnge,d(:,i))
> if i == 1 title('My title') endif
> grid,ylabel(sprintf('Series %d',i));
> if i == m axis("tic","label") else axis("ticy","labely") endif
> pos = get(ah,'position') .* [1 1 1.2 2.5] + [-0.075 -0.05 0 0];
> set(ah, 'position', pos);
>endfor
Henk, have you tried my suggestion? Have you managed to find a solution
to your problem? Please answer on the mailing list, so everyone can
benefit from it now and in the future.
--
Francesco Potortì (ricercatore) Voice: +39.050.621.3058
ISTI - Area della ricerca CNR Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa Skype: wnlabisti
(gate 20, 1st floor, room C71) Web: http://fly.isti.cnr.it