tick label problem [message #42734] |
Mon, 21 February 2005 09:11  |
steph
Messages: 3 Registered: February 2005
|
Junior Member |
|
|
Hi,
I am using AXIS to plot a secondary x axis with customed tick position
and labels. For some reason, I am not able to find a way to avoid
having the 'zeroth' tick labeled with '0.000'. This is what I am using
in my code (after I use plot with xstyle=8):
;Array of labels (numbers 0 to 5 --> strings)
lab = strtrim(string([0,1,2,3,4,5]),1)
;Array of position of ticks in data units
V = [0.0,0.123,0.435,0.668,1.12,1.67]
;Add secondary axis (x axis at top)
axis, xaxis=1, xticks=6, xtickv=V, xtickname=lab
With this code, IDL draws the secondary x-axis as required but also
adds a label '0.000' at the location of the yaxis. This label is wrong
but I don't know how to get rid of it. Any ideas?
Many thanks,
Steph
|
|
|
Re: tick label problem [message #42842 is a reply to message #42734] |
Tue, 22 February 2005 13:36  |
Heinz Stege
Messages: 189 Registered: January 2003
|
Senior Member |
|
|
On 21 Feb 2005 09:11:24 -0800, steph wrote:
> ;Add secondary axis (x axis at top)
> axis, xaxis=1, xticks=6, xtickv=V, xtickname=lab
>
Isn't xticks the number of tick intervals? (Instead of the number of
ticks.) If so, then this should work:
axis, xaxis=1, xticks=5, xtickv=V, xtickname=lab
Greetings, Heinz
|
|
|