octave-maintainers
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]