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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -