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

Home » Public Forums » archive » COLORBAR label too long
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 [message #56719 is a reply to message #55359] Fri, 09 November 2007 11:35 Go to previous messageGo to previous message
phillipbitzer is currently offline  phillipbitzer
Messages: 6
Registered: November 2007
Junior Member
On Nov 9, 11:59 am, David Fanning <n...@dfanning.com> wrote:
> phillipbit...@gmail.com writes:
>> For anyone who's used D Fanning's colorbar program-
>
>> When using colorbar pro, how can I get the values of the tickmarks (!
>> x.tickv doesn't work - return an array of 0's)?
>
>> Here's the underlying reason, when annotating the color bar, the
>> program (seems to one be able to) annotates the major tick marks. I
>> actually would like my tick labels not on the major tick marks, but
>> "in the middle" of the color. I think this would correspond to (only)
>> labelling the minor tick marks.
>
>> Maybe a visual would help me be more clear:
>
>> Instead of labelling:
>> here here here
>> |----------|----------|
>
>> I would like:
>> here here
>> |----------|----------|
>
>> I've been fooling around with the parameters, but to no avail. Anyone
>> else have this need/want before? Anyone have any ideas to accomplish
>> this?
>
> The COLORBAR program, for historical reasons, as well as for
> ease of programming, uses a PLOT command to do the annotation.
> So, what you want to do is not possible with that code.
>
> And because of recent changes, I can't even offer an undocumented
> keyword solution that will completely scrub the bar of annotations,
> so you could write your own axis labeling routine. :-(
>
> I'd recommend just writing your own colorbar routine. You can use
> PLOTS to draw your boxes on the colorbar image, and you can annotate it
> however you like with XYOUTS.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")


OK, so if anyone's interested, I've got a little workaround.
Basically, it's slightly mod-ing of colorbar so that it works (I'm
doing a vertical bar, with /right set)- the keyword I was looking for
is [xyz]tick_get:

PLOT,[minrange,maxrange], [minrange,maxrange], /NODATA,
XTICKS=1, $

YTICKS=divisions, XSTYLE=1, YSTYLE=1, $

POSITION=position, COLOR=color, CHARSIZE=charsize, /NOERASE,
$

YTICKFORMAT='(A1)', XTICKFORMAT='(A1)', YTICKLEN=ticklen , $

YRANGE=[minrange, maxrange], FONT=font, _EXTRA=extra,
YMINOR=minor, ytick_get=Y_tick_values

mid = FINDGEN(divisions)
FOR i=0, N_ELEMENTS(y_tick_values)-2 DO BEGIN
mid[i] = (y_tick_values[i]+y_tick_values[i+1])/2
ENDFOR

AXIS, YAXIS=1, YTICKV=mid, $
YTICKFORMAT=format, YTICKS=divisions, $

YTICKLEN=ticklen, YSTYLE=1, COLOR=color, CHARSIZE=charsize,
$

FONT=font, YTITLE=title, _EXTRA=extra, YMINOR=minor,
YTICKNAME=ticknames
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to use customized Hershey fonts?
Next Topic: CUDA technology in IDL

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

Current Time: Sat Nov 29 21:45:56 PST 2025

Total time taken to generate the page: 0.80529 seconds