Turning Axis Labelling Off [message #89779] |
Wed, 03 December 2014 08:11  |
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   |
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   |
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   |
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
|
|
|
|