|
"Juliette Salexa" <juliette.physicist@gmail.com> wrote in message <h5ns1d$5ku$1@fred.mathworks.com>...
> In bar3, if for example each row of bars has one bar that's higher than the rest in that row, and the height of these highest bars is very different in each row, chances are that you'll only see the global highest bar, and the rest of the bars will all look almost null.
>
> But what if we want to see at least the highest bar of each row ??
> The scale of each row will have to be renormalized to the scale of its highest bar.
> Much like plotyy('x1','y1','x2','y2',@bar) except instead of 2 y-scales, EACH ROW has a separate z-scale.
>
> I looked through the matlab documentation of bar3 and on the FEX for something that does this.
>
> Before starting to write a function to do this, I thought I'd first double check if anyone's seen something like this on FEX (or internal to matlab) .. just to make sure I'm not wasting my time. Because it seems like something MANY people have had to do before.
>
> Also, if you have looked for something like this unsuccessfully, then I would also appreciate you telling me so!
one of the solutions
m=reshape(1:3*4,[3,4]);
subplot(1,2,1);
bar3(m);
subplot(1,2,2);
mn=bsxfun(@rdivide,m,max(m));
bar3(mn);
us
|