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

Home » Public Forums » archive » Re: CAT, DOG, 1.7 AND FISH IN IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: CAT, DOG, 1.7 AND FISH IN IDL [message #32951] Mon, 18 November 2002 21:03
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
MC (markchan@shaw.ca) writes:

> To Group,
>
> x=[2,4,6,8]
> y=[200,400,600,800]
> plot,x,y
>
> One gets a plot. But not what I want.
>
> I need to replace the x-axis with the following axis:
>
> where x=2, a label 'cat'
> where x=4, a label 'dog'
> where x=6, a label '1.7'
> where x=8, a label 'fish'
>
> I know how to suppress the original x-axis, but don't know how to put the
> new one in. I am not into object graphic either.

That's too bad about the object graphics thing. It would
be so elegant, and only take about 45 minutes. :-)

How about something like this then.

FUNCTION animal_names, axis, index, value
names = ['cat', 'dog', '1.7', 'fish']
RETURN, names[index]
END

x=[2,4,6,8]
y=[200,400,600,800]
plot,x,y, XTickformat='Animal_Names'


Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Previous Topic: CAT, DOG, 1.7 AND FISH IN IDL
Next Topic: Re: open files in some directory

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

Current Time: Fri Oct 10 12:55:43 PDT 2025

Total time taken to generate the page: 0.96015 seconds