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:
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
Comments
Post a Comment