Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
label directly on bar graph

Subject: label directly on bar graph

From: Tomas

Date: 1 Apr, 2011 08:01:04

Message: 1 of 2

Hi.

I wonder if there is a way of putting labels directly on the bar graph, not on the x and y axes.

For example I got two stacked bars
data = rand(2,3);
barh(data, 'stacked');

I want to label the color regions by putting text directly on bars.

Thanks,

Tomas

Subject: label directly on bar graph

From: Steven_Lord

Date: 1 Apr, 2011 13:39:44

Message: 2 of 2



"Tomas " <tomasnic@gmail.com> wrote in message
news:in40o0$7mr$1@fred.mathworks.com...
> Hi.
>
> I wonder if there is a way of putting labels directly on the bar graph,
> not on the x and y axes.
> For example I got two stacked bars
> data = rand(2,3);
> barh(data, 'stacked');
>
> I want to label the color regions by putting text directly on bars.

Use the TEXT function.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us