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:
Multiple txt in the plot with different position

Subject: Multiple txt in the plot with different position

From: Skirt Zhang

Date: 23 Jul, 2011 11:34:07

Message: 1 of 2

I want to create such plot

  |
5| *3
4| *2
3| *1
  |
  |
  |
  |
   ----------------------------------------------------------------------------------------------
       1 5 10

for i=1:3
txtheader{i}=i
end

the data y= [5 4 3] on y axis and x=[1 5 10] are plotted and I want to add the multiple txtheader in this plot, how could I do this through simple code?

Thanks a lot in advance

Subject: Multiple txt in the plot with different position

From: Steven_Lord

Date: 25 Jul, 2011 13:36:02

Message: 2 of 2



"Skirt Zhang" <silence_qunzi@hotmail.com> wrote in message
news:j0ebjf$38a$1@newscl01ah.mathworks.com...
> I want to create such plot
>
> |
> 5| *3 4| *2
> 3|
> *1
> |
> |
> |
> |
> ----------------------------------------------------------------------------------------------
> 1 5
> 10
>
> for i=1:3
> txtheader{i}=i
> end
>
> the data y= [5 4 3] on y axis and x=[1 5 10] are plotted and I want to add
> the multiple txtheader in this plot, how could I do this through simple
> code?

If you want to label each point, look at the TEXT function.

If that's not what you want to do, you'll need to explain in more detail
exactly what you want to do; in particular what "add the multiple txtheader"
means.

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

Tags for 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