comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Plot
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Plot [message #78570] Fri, 09 December 2011 07:06 Go to next message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
Folks
hi,
I have a data like this and i want to plot column 1 (x) and column 2
(y) and column 3 as the name of the points on plot (like 12006, 12507
etc.). Could somebody help please?

0 0 12006
35 196.7 12507
70 779.8 13008
140 37 14010
.............
Cheers,
Dave
Re: Plot [message #78752 is a reply to message #78570] Fri, 09 December 2011 16:11 Go to previous messageGo to next message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On 12/9/11 3:06 PM, Dave Poreh wrote:
> Folks
> hi,
> I have a data like this and i want to plot column 1 (x) and column 2
> (y) and column 3 as the name of the points on plot (like 12006, 12507
> etc.). Could somebody help please?
>
> 0 0 12006
> 35 196.7 12507
> 70 779.8 13008
> 140 37 14010
> .............
> Cheers,
> Dave

Try using XYOUTS.

-Jeremy.

.
Re: Plot [message #78753 is a reply to message #78570] Fri, 09 December 2011 08:58 Go to previous messageGo to next message
Mark Piper is currently offline  Mark Piper
Messages: 198
Registered: December 2009
Senior Member
On 12/9/2011 8:06 AM, Dave Poreh wrote:
> Folks
> hi,
> I have a data like this and i want to plot column 1 (x) and column 2
> (y) and column 3 as the name of the points on plot (like 12006, 12507
> etc.). Could somebody help please?
>
> 0 0 12006
> 35 196.7 12507
> 70 779.8 13008
> 140 37 14010
> .............
> Cheers,
> Dave

Would this be close?

x = [0, 35, 70, 140]
y = [0, 196.7, 779.8, 37]
s = string([12006, 12507, 13008, 14010])

; NG (IDL 8.1)
p = plot(x, y)
ps = symbol(x, y, sym_text=s, /data)

; DG (IDL 1.0)
plot, x, y
xyouts, x, y, s, alignment=0.5, /data

You'll likely have to tweak the axis ranges to ensure the labels show up.

mp

.
Re: Plot [message #84643 is a reply to message #78752] Sat, 10 December 2011 06:04 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Dec 9, 4:11 pm, Jeremy Bailin <astroco...@gmail.com> wrote:
> On 12/9/11 3:06 PM, Dave Poreh wrote:
>
>> Folks
>> hi,
>> I have a data like this and i want to plot column 1 (x) and column 2
>> (y) and column 3 as  the name of the points on plot (like 12006, 12507
>> etc.). Could somebody help please?
>
>> 0     0        12006
>> 35  196.7    12507
>> 70  779.8    13008
>> 140  37      14010
>> .............
>> Cheers,
>> Dave
>
> Try using XYOUTS.
>
> -Jeremy.
>
> .
Mark, when i am running it gives me this error:
ps = symbol(x, y, sym_text=s, /data)
but still i have the plot.
Cheers,
Dave
^
% Syntax error.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How 2 access to ubuntu in my office
Next Topic: Re: kronecker product

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:36:30 PDT 2025

Total time taken to generate the page: 0.00604 seconds