[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fltk erases subplots
From: |
Juan Pablo Carbajal |
Subject: |
fltk erases subplots |
Date: |
Tue, 16 Dec 2014 14:56:10 +0100 |
Hi,
FLTK has a weird behavior with subplots.
First it resizes them on the fly, but if that is disregarded as
"style" the following behavior is definitely a bug.
order=[4 8 12 11 16 15 14 10 13 9 5 6 1 2 3 7];
for i=1:length(order);
subplot(4,4,order(i));
plot(randn(10,1));
text(0,0,num2str(i));
axis off;
pause;
endfor
If you ran that script you see that axes numbered 7 and 8 are plotted
but then erased when axes numbered 9 and 10 are created.
A work around is to do the following
for i=1:16;
ax(i)=subplot(4,4,i);
endfor;
order=[4 8 12 11 16 15 14 10 13 9 5 6 1 2 3 7];
for i=1:length(order);
axes(ax(order(i)));
plot(randn(10,1));
text(0,0,num2str(i));
axis off;
pause;
endfor
but it quite annoying.
Also if you create the figure anew (i.e. clf()), you see that the
first 3 plots have a nice size (they do not waste so much space) but
when the column of plots are added the already existing ones are
squeezed horizontally.
Why?
Shall I report this bug?
It might be the reason for this other bug
https://savannah.gnu.org/bugs/?func=detailitem&item_id=43064
- fltk erases subplots,
Juan Pablo Carbajal <=
- Re: fltk erases subplots, Andreas Weber, 2014/12/16
- Re: fltk erases subplots, Juan Pablo Carbajal, 2014/12/16
- Re: fltk erases subplots, Pantxo, 2014/12/16
- Re: fltk erases subplots, Juan Pablo Carbajal, 2014/12/16
- Re: fltk erases subplots, Pantxo Diribarne, 2014/12/16
- Re: fltk erases subplots, Juan Pablo Carbajal, 2014/12/16
- Re: fltk erases subplots, Pantxo Diribarne, 2014/12/16