Message from discussion IDL v7.0 "native" colourbar procedure?
Received: by 10.68.223.40 with SMTP id qr8mr4646351pbc.0.1335805176636;
Mon, 30 Apr 2012 09:59:36 -0700 (PDT)
From: Paul van Delst <paul.vande...@noaa.gov>
Subject: Re: IDL v7.0 "native" colourbar procedure?
Date: Mon, 30 Apr 2012 12:59:35 -0400
Organization: Aioe.org NNTP Server
References: <firstname.lastname@example.org> <13085944.543.1335803797932.JavaMail.geo-discussion-forums@ynee1>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.3) Gecko/20120307 Thunderbird/10.0.3
X-Notice: Filtered by postfilter v. 0.8.2
Content-Type: text/plain; charset=ISO-8859-1
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')
; 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)
; 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+(barPlusTextDims/2.), $
; Draw the colorbar:
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.
On 04/30/12 12:36, jimmyleependle...@gmail.com wrote:
> On Monday, April 30, 2012 10:32:48 AM UTC-6, Paul van Delst wrote:
>> 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.
>> p.s. And I did search using the US spelling for colour. :o)
> The IDLgrColorbar class has been available since 5.1.
> Jim P