Menu

#113 hard limit of 16 subplots per figure

closed-fixed
nobody
None
5
2007-06-13
2007-06-12
maddanio
No

here is the script I use:

>>>>>>>>>>>>>>>>

function plotstuff
load fb1;load fb2;load fb3;load in_clean; load in_noize;
clf
I=[3 4 5 6];
for i=1:4
ii = I(i);
myimagesc(4,5,i,1,in_clean{ii});
myimagesc(4,5,i,2,in_noize{ii});
myimagesc(4,5,i,3,fb1{ii}(11:39,11:39,:));
myimagesc(4,5,i,4,fb2{ii}(11:39,11:39,:));
myimagesc(4,5,i,5,fb3{ii}(11:39,11:39,:));
end
subplot(4,5,1)

function myimagesc(nrow,ncol,row,col,img)
subplot(nrow,ncol,ncol*(row-1)+col);
pcolor(img(:,end:-1:1)');
set(gca,'ytickmode','manual');
set(gca,'xtickmode','manual');
set(gca,'ztickmode','manual');
set(gca,'yticklabelmode','manual');
set(gca,'xticklabelmode','manual');
set(gca,'zticklabelmode','manual');
set(gca,'box','off');

<<<<<<<<<<<<<<<<<<

it doesn't draw the last 4 figures in the last row, the first of which only has it's axes drawn.

Discussion

  • maddanio

    maddanio - 2007-06-12

    Logged In: YES
    user_id=1687341
    Originator: YES

    ah, this is also under octave 2.9.12

     
  • Shai Ayal

    Shai Ayal - 2007-06-12

    Logged In: YES
    user_id=136223
    Originator: NO

    Octplot has a limit of 16 axes per figure. It used to be 9, and I increased it to 16 thinking that no-one would want more then that.
    The limit is due to OpenGL limitations -- The normal MESA implementation has a 16 bit depth buffer. In octplot I use the z-buffer for layers (i.e. to get one object on top of the other). this means 65,536 layers per figure which I divide equally between all possible axes -- hence 4096 layers per axes, which is not very much. So increasing the number of possible axes would decrease the layers per axes. The question remains what is the optimal number?
    What would be a reasonable limit on the number of axes?
    What would be a reasonable limit on the number of layers per axes?

    Shai

     
  • Shai Ayal

    Shai Ayal - 2007-06-12
    • summary: subplots do not all get drawn --> hard limit of 16 subplots per figure
     
  • maddanio

    maddanio - 2007-06-12

    Logged In: YES
    user_id=1687341
    Originator: YES

    ah, okay. hmm, but subplots do not usually overlap, so they don't need to share z-buffer range. only "hold on" style plots do. So you could have unlimited subplots but limited "hold on" style overlayed plots within one subplot region.

     
  • Shai Ayal

    Shai Ayal - 2007-06-13

    Logged In: YES
    user_id=136223
    Originator: NO

    True, subplots do not overlap, but axes objects may overlap. Two examples which spring to my head are:
    1. Legend, which I plan to implement as an axes abject
    2. Insert with zoom (see demos/layers.m)

    I think the solution will be not to pre-assign depth ranhes to each hypothetical axes, but rather to give each axes as much layers as needed. This could give you up to 2^15 axes with on line each (or 2^16 empty axes, whatever use that may be)
    I'll work on it ....

     
  • Shai Ayal

    Shai Ayal - 2007-06-13
    • status: open --> closed-fixed
     
  • Shai Ayal

    Shai Ayal - 2007-06-13

    Logged In: YES
    user_id=136223
    Originator: NO

    fixed in svn 475 -- now the limit of the number of axes is determined by depth buffer only.
    Currently, 16,384 layers (== objects) are allowed per figure

    Shai

     

Log in to post a comment.