gramm
gramm copied to clipboard
adding a layout, such that I can make a multiplot which is in line with my metrology layout
Is the Gramm toolbox capable to make a plot like this? So that I can make a multiplot which is corresponds to the locations where I measured. Would be nice if I could make a plot per measurement location and Ideally I would combine that with a %call g(1,1).stat_ellipse('type','95percentile','geom','area','patch_opts',{'FaceAlpha',0.1,'LineWidth',2}); Currently it puts all measurement together, but I'd like to have a ellipse at each location, indicating the variance of each location.
The closest that I could get to this is to make a loop: layout = [X1,X2,..Xn;Y1,Y2,...,Yn] t_temp.layout_id = [repmat(1:m,n)] dy = 0.1;% Height of plot dx = dy;% width of plot for i_pos = 1:size(layout,1) g(i_pos,1) = gramm('x',t_temp.x,'y',t_temp.y,'color',t_temp.channel,'group',t_temp.layout_id) g(i_pos,1).stat_ellipse('type','95percentile','geom','area','patch_opts',{'FaceAlpha',0.1,'LineWidth',2}); g(i_pos,1).set_layout_options('Position',[layout(_pos,1)-dx/2 layout(i_pos,2)-dy/2 dx dy],... %Set the position in the figure 'legend',false,... % No need to display legend for side histograms 'margin_height',[0.02 0.05],... %We set custom margins 'margin_width',[0.1 0.02],... 'redraw',false); %We deactivate automatic redrawing/resizing end
but maybe you already know a better way to make such a plot.