Re: changing the format of axis [message #78492 is a reply to message #78363] |
Tue, 22 November 2011 08:00   |
Jeremy Bailin
Messages: 618 Registered: April 2008
|
Senior Member |
|
|
On 11/22/11 7:52 AM, khorsand10@yahoo.com wrote:
> On Nov 21, 9:57 pm, Brian Wolven<brian.wol...@gmail.com> wrote:
>> You'll need to use the [XYZ}TICKV keyword, as documented in the PLOT procedure.
>
> well, it still doesnt show the x values on X Axis.
> y=[0.1,0.5,0.2,0.4,0.13]
> x=[-12,-8,0,5,10]
> plot,x,y,xtickv=x
From the IDL help:
Note
To specify the number of ticks and their values exactly, set
[XYZ]TICKS=N(where N > 1) and [XYZ]TICKV=Values, where Values has N+1
elements.
So if I do
plot, x, y, xtickv=x, xticks=n_elements(x)-1
then I get what you want.
-Jeremy.
|
|
|