matlab - Plot many horizontal Bar Plots in the same graph -


i need plot x-y function, shows histograms @ x-values. similar bottom plot of next figure:

set of vertical histograms

i tried use matlab's "barh", can't plot many in same figure. ideas?

or, maybe displacing origin (baseline, basevalue in barseries properties) of successive plots work. how barh?

thanks.

using 'position' of axes property

% generate "data" m = rand( 40,10 );  [n x] = hist( m, 50 );  % actual plotting figure;  ma = axes('position',[.1 .1 .8 .8] );  % "parent" axes n = size(n,2);  % number of vertical bars ii=1:n,     % create axes inside parent axes ii-the barh    sa = axes('position', [0.1+(ii-1)*.8/n, 0.1, .8/n, .8]); % position ii-th barh    barh( x, n(:,ii), 'parent', sa);     axis off; end 

enter image description here


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -