changing colors in bar3 plot

  • Follow


Hi,
        I am using bar3 plot for some 3 dimensional data. I observe
that the bars are having different colors based on which column they
belong to. Can anybody tell me how to make the color of all the bars
same, rather than different colors. I guess more helpful would be to
know how to manipulate the face colors of the bars in a bar plot.

thanks a lot
Neel

code :  bar3(data)    %  data is a matrix of size [8x4]

0
Reply nilanjan (17) 6/23/2006 5:03:08 PM

Hi,

With Matlab R12.1 (BAR3 returns SURFACE objects) :

Y = cool(7);
bar3(Y,'stacked')
h=findobj('type','surface');
set(h,'facecolor',[1 0 0])

With Matlab R14 (BAR3 returns PATCH objects) :

Y = cool(7);
bar3(Y,'stacked')
h=findobj('type','patch');
set(h,'facecolor',[1 0 0])

J�r�me
0
Reply dutmatlab (3796) 6/23/2006 5:13:04 PM


1 Replies
422 Views

(page loaded in 0.049 seconds)

Similiar Articles:










7/19/2012 6:00:54 PM


Reply: