|
|
Bar Graph: bar color and bar title
Dear All,
I want to plot a bar graph as follow,
YY = [0.2722 0.2126 0.2543 0.2576 0.0034];
bar(YY);
now when I plot the graph as above, it gives me only blue color for the bar and also on x-axis it give me number 1,2,3,4,5 against each bar.
following what I want to do,
1) To color individual bar with different color.
2) Make Legend(text) for each bar, instead of number, at the bottom/top of each bar.
|
|
0
|
|
|
|
Reply
|
rabbahs
|
8/14/2010 10:24:04 AM |
|
rabbahs wrote:
> I want to plot a bar graph as follow,
>
> YY = [0.2722 0.2126 0.2543 0.2576 0.0034];
> bar(YY);
>
> now when I plot the graph as above, it gives me only blue color for the
> bar and also on x-axis it give me number 1,2,3,4,5 against each bar.
>
> following what I want to do,
>
> 1) To color individual bar with different color.
Not easily. Please see
http://groups.google.ca/group/comp.soft-sys.matlab/browse_thread/thread/931a93a767131bd2/45297573ca2460cd
> 2) Make Legend(text) for each bar, instead of number, at the
> bottom/top of each bar.
Set the xticklabel property of the axes that the bars are in.
|
|
0
|
|
|
|
Reply
|
Walter
|
8/15/2010 4:37:56 PM
|
|
|
1 Replies
956 Views
(page loaded in 0.031 seconds)
|
|
|
|
|
|
|
|
|