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

Home » Public Forums » archive » Turning Axis Labelling Off
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
Turning Axis Labelling Off [message #89779] Wed, 03 December 2014 08:11 Go to next message
g.nacarts is currently offline  g.nacarts
Messages: 148
Registered: November 2013
Senior Member
Hi

I am using the cgimage function to display my images. I draw the axis on top of my images, but I don't want the axis to be labelled. I used the following code

cgimage, Im1, /AXES, AXKeywords={XTicklen:1.0, YTickLen:1.0, axiscolor:'blue', xminor:1, yminor:1, xtickinterval:30, ytickinterval:30}, /SAVE,Position=pos[*,0]

I tried the XTICKFORMAT keyword but is not allowed to the cgimage function.

How can I turn axis labelling off? Can anyone please help with this?
Re: Turning Axis Labelling Off [message #89786 is a reply to message #89779] Wed, 03 December 2014 10:25 Go to previous messageGo to next message
vaibhavpant55 is currently offline  vaibhavpant55
Messages: 10
Registered: December 2014
Junior Member
On Wednesday, December 3, 2014 9:41:08 PM UTC+5:30, g.na...@gmail.com wrote:
> Hi
>
> I am using the cgimage function to display my images. I draw the axis on top of my images, but I don't want the axis to be labelled. I used the following code
>
> cgimage, Im1, /AXES, AXKeywords={XTicklen:1.0, YTickLen:1.0, axiscolor:'blue', xminor:1, yminor:1, xtickinterval:30, ytickinterval:30}, /SAVE,Position=pos[*,0]
>
> I tried the XTICKFORMAT keyword but is not allowed to the cgimage function.
>
> How can I turn axis labelling off? Can anyone please help with this?


I use [x,y,z]tickname to suppress labeling of axis. I never used them with CGimage function.
Set [x,y,z]tickname to a string array with same size as the number of ticks in that axis. Element of string array should be a SPACE Eg.

x=fltarr(256,256)
plot_image,x,xticklen=replicate(' ',6),yticklen=replicate(' ',6)

Vaibhav Pant
Indian Institute Of Astrophysics
India
Re: Turning Axis Labelling Off [message #89787 is a reply to message #89786] Wed, 03 December 2014 10:46 Go to previous messageGo to next message
vaibhavpant55 is currently offline  vaibhavpant55
Messages: 10
Registered: December 2014
Junior Member
On Wednesday, December 3, 2014 11:55:28 PM UTC+5:30, Vaibhav Pant wrote:
> On Wednesday, December 3, 2014 9:41:08 PM UTC+5:30, g.na...@gmail.com wrote:
>> Hi
>>
>> I am using the cgimage function to display my images. I draw the axis on top of my images, but I don't want the axis to be labelled. I used the following code
>>
>> cgimage, Im1, /AXES, AXKeywords={XTicklen:1.0, YTickLen:1.0, axiscolor:'blue', xminor:1, yminor:1, xtickinterval:30, ytickinterval:30}, /SAVE,Position=pos[*,0]
>>
>> I tried the XTICKFORMAT keyword but is not allowed to the cgimage function.
>>
>> How can I turn axis labelling off? Can anyone please help with this?
>
>
> I use [x,y,z]tickname to suppress labeling of axis. I never used them with CGimage function.
> Set [x,y,z]tickname to a string array with same size as the number of ticks in that axis. Element of string array should be a SPACE Eg.
>
> x=fltarr(256,256)
> plot_image,x,xticklen=replicate(' ',6),yticklen=replicate(' ',6)
>
> Vaibhav Pant
> Indian Institute Of Astrophysics
> India

Sorry, there is a mistake. It should be
plot_image,x,xtickname=replicate(' ',6),ytickname=replicate(' ',6)

Vaibhav Pant
Re: Turning Axis Labelling Off [message #89788 is a reply to message #89779] Wed, 03 December 2014 10:57 Go to previous messageGo to next message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
On Wednesday, December 3, 2014 10:11:08 AM UTC-6, g.na...@gmail.com wrote:
> Hi
>
> I am using the cgimage function to display my images. I draw the axis on top of my images, but I don't want the axis to be labelled. I used the following code
>
> cgimage, Im1, /AXES, AXKeywords={XTicklen:1.0, YTickLen:1.0, axiscolor:'blue', xminor:1, yminor:1, xtickinterval:30, ytickinterval:30}, /SAVE,Position=pos[*,0]
>
> I tried the XTICKFORMAT keyword but is not allowed to the cgimage function.
>
> How can I turn axis labelling off? Can anyone please help with this?

You can do it via the tickname keyword (like Valibhav said) or tickformat.

cgimage, Im1, /AXES, AXKeywords={XTickFormat:'(A1)'}

https://www.idlcoyote.com/tips/axis_label_off.html
Re: Turning Axis Labelling Off [message #89794 is a reply to message #89779] Wed, 03 December 2014 13:22 Go to previous message
g.nacarts is currently offline  g.nacarts
Messages: 148
Registered: November 2013
Senior Member
Thank you very much :)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: idl equivalent of Iraf
Next Topic: Filling the frame of a NG plot

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

Current Time: Wed Oct 08 13:48:19 PDT 2025

Total time taken to generate the page: 0.00652 seconds