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

Home » Public Forums » archive » Re: GUI strategy advice needed
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: GUI strategy advice needed [message #44153 is a reply to message #44152] Tue, 24 May 2005 12:04 Go to previous messageGo to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Leslie Welser wrote:
>> Michael Wallace writes:
>> I don't mean to take this thread off subject, but what is the problem
>
>
>> with IDLgrColorbar? I've used OG colorbars in a lot of my plots and
>> never had any issue with them. So, what's not to understand? Just
>
> curious.
>
> Michael, since you seem to understand the IDLgrColorbar, can you give
> me a pointer? My colorbar looks great and is positioned correctly, but
> no matter what I try I can't get the tickmarks to be anything but the
> values from 0-255. In other words, I can't get the colors themselves
> to "link up" with the data values in my plot. Thanks for any help you
> can give me!
>

I'm sure Michael has something better up his sleeve, but I have been
manipulating the tick values by explicitly providing the tick text, ala...

datarange = [15,35.]
colorbar = obj_new('idlgrcolorbar', /show_outline, /show_axis)
colorbar->GetProperty, tickvalues = ticks
nticks = n_elements(ticks)
myTicks = FINDGEN(nTicks)/(nTicks-1) * (dataRange[1]-dataRange[0]) +
dataRange[0]
myTickString = STRTRIM(myTicks,2)
ticktext = OBJ_NEW('idlgrtext', mytickString)
colorbar->SetProperty, ticktext = ticktext
xobjview, colorbar

If you do it this way you'll want to cleanup the ticktext on your own.
I have a simple object that inherits from IDLgrContainer that cleans up
the ticktext, fonts and titles when the colorbar is destroyed. That
prevents memory leakage.

Cheers,
Ben
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: help: window content erased after resize
Next Topic: OVERPLOT POINTS IN CONTOUR

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

Current Time: Fri Oct 10 23:46:31 PDT 2025

Total time taken to generate the page: 0.56363 seconds