How I can define the group colour in 3D bar plot?
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I did 3d bar plot:
Z = data(2000:4000,:); % data
Y = [1 300 600]; % The positions of bars along the y axis
h = bar3(Y,Z',0.1);
set(gca, 'YTickLabel', {'s1' 's2' 's3'});
I want s1 (green) s2( red) s3 (blue) (See Figure).
All suggestions are welcomed
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166229/image.png)
0 个评论
回答(1 个)
Walter Roberson
2017-7-22
Unfortunately in R2014b and all other released versions (currently R2017a), the only way to control color in bar charts is to call bar once per color you want to use.
5 个评论
Walter Roberson
2017-7-22
Sorry, I do not know at the moment, and I think it is time for me to head to bed.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!