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

Home » Public Forums » archive » Re: IDL v7.0 "native" colourbar procedure?
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: IDL v7.0 "native" colourbar procedure? [message #80130 is a reply to message #80129] Mon, 30 April 2012 09:59 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Thanks! But, phewph, I was looking for something direct-graphics-y (or "traditional" to use DF parlance :o)

I should've also added the caveat that the colleague in question also stated he doesn't want to have to learn how to
program in IDL, just to plot the data (he was quite clear about that :o). I would direct him to the "Using Colorbar
Objects" help page, but even I think the example code there is way over the top.... :o), i.e.

; Create a window, view, and model:
mywindow = OBJ_NEW('IDLgrWindow')
myview = OBJ_NEW('IDLgrView')
mymodel = OBJ_NEW('IDLgrModel')
myview->Add, mymodel
; Create the colorbar. Make the bar one tenth of
; the window size horizontally and four tenths of
; the window size vertically. Show the axis values (using the
; default axis annotations) and draw an outline around the bar.
mytitle = OBJ_NEW('IDLgrText', 'My Colorbar')
barDims = [0.1, 0.4]
redValues = BINDGEN(256)
greenValues = redValues
blueValues = REVERSE(redValues)
mycolorbar = OBJ_NEW('IDLgrColorbar', redValues, $
greenValues, blueValues, TITLE=mytitle, $
DIMENSIONS=barDims, /SHOW_AXIS, /SHOW_OUTLINE)
mymodel->Add, mycolorbar
; Center the colorbar in the window.
; Note that you must use the ComputeDimensions method to
; get the dimensions of the colorbar.
barPlusTextDims = mycolorbar->ComputeDimensions(mywindow)
mymodel->Translate, -barDims[0]+(barPlusTextDims[0]/2.), $
-barDims[1]+(barPlusTextDims[1]/2.), 0
; Draw the colorbar:
mywindow->Draw, myview


I mean, we're all scientists here!

Can one mix regular direct graphics contour plots with the IDLgrColorbar? Window? View? Model? Wha...?

No, don't answer that. I'll convince him to download the cg* library.

cheers,

paulv


On 04/30/12 12:36, jimmyleependleguy@gmail.com wrote:
> On Monday, April 30, 2012 10:32:48 AM UTC-6, Paul van Delst wrote:
>> Hello,
>>
>> I have a colleague who is using a machine with a bog-standard IDL v7.0 install. I'm putting together a small script to
>> allow him to contour some data and I'm wondering: is there is a pre-function-graphics colourbar procedure in IDL?
>>
>> I can't find anything non-function-graphics-y in my version of IDL help (which is for v8.x) and there is no extra
>> user-contrib stuff on the machine in question (like I said, a bog-standard install with no coyote graphics, esrg, etc
>> colourbar stuff).
>>
>> Thanks for any info.
>>
>> cheers,
>>
>> paulv
>>
>> p.s. And I did search using the US spelling for colour. :o)
>
> The IDLgrColorbar class has been available since 5.1.
>
> Jim P
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL v7.0 "native" colourbar procedure?
Next Topic: simplest contour & .png

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

Current Time: Fri Oct 10 19:26:36 PDT 2025

Total time taken to generate the page: 0.40127 seconds