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

Home » Public Forums » archive » Re: colorbar and [XY]tickname
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: colorbar and [XY]tickname [message #39382] Wed, 12 May 2004 05:39
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Einar M. Einarsson writes (again):

> I was wondering if somone (David?) knows why I can't use the
> [xy]tickname keyword to Davids Fannings colorbar program?
>
> Here is my code:
>
> print, names
> help,names
>
> colorbar, /vertical, $
> Position = col_pos, $
> Range=[0,r_levels(n_elements(r_levels)-1)], $
> NColors=n_elements(r_levels)-1, $
> Bottom=101, $
> Color=!P.color, $
> Divisions=n_elements(r_levels)-1,$
> /right, $
> TITLE='mm/3klst',$
> font=1, $
> ycharsize=1.3, $
> ytickname=names,$
> format='(A2)'
>
> Here is the print/help output:
> 0 1 2 3 4 5 10
> 15 20
> NAMES STRING = Array[9]
>
> And the result can be found on: http://www.os.is/~or/test/png/A13.png
> I belived that the _extra keyword would take care of this! Or like you
> guys see i want the scale to be irregular, do you maybe know some
> better method to do this? or do I just have to modify the colorbar
> program myself?

Well, this is a fairly subtle problem, it seems to me
after I've puzzled over it for an hour. I think it
boils down to the fact that you don't want to simultaneously
use strings for your plot annotations AND use the FORMAT
keyword. I guess this makes sense. If you are asking IDL
to use strings you have provided, then the format will be
determined by the strings.

Bottom line, I think this call above will work if you set
the FORMAT keyword equal to a null string (ie, FORMAT='').
This will have to be done for COLORBAR *whenever* you provide
the [XY]TICKNAME keyword.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Previous Topic: colorbar and [XY]tickname
Next Topic: Re: Alternative [XY]ticknames on colorbar

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

Current Time: Fri Oct 10 12:51:38 PDT 2025

Total time taken to generate the page: 1.35630 seconds