Re: iTools colorbar [message #60194 is a reply to message #60085] |
Mon, 05 May 2008 07:13   |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
In article
<7094342c-12c0-43dd-a7cd-5013c9095075@c58g2000hsc.googlegroups.com>,
"sdettrick@gmail.com" <sdettrick@gmail.com> wrote:
> IPLOT, [0.0, 1.0], [0.0, 1.0], [0.0, 1.0], OVERPLOT = itool_id, /HIDE, $
> /INSERT_COLORBAR, RGB_TABLE = rgb_table
> colorbar_id = itool_obj -> FindIdentifiers('*COLORBAR', /ANNOTATION)
> colorbar_obj = itool_obj -> GetByIdentifier(colorbar_id[0])
> colorbar_obj -> SetProperty, ORIENTATION = 1, $
> BORDER = 1, $
> TITLE = 'Ozone (ppbv)', $
> MAJOR = 5, $
> MINOR = 1
> itool_obj -> RefreshCurrentWindow
> By the way there is a bug in vertical colorbar plots which can be
> fixed by hand - in idlitviscolorbar__define.pro, change the line:
>
> data = currentorientation ? BINDGEN(2,256) : BINDGEN(256,2)
>
> to:
>
> data = currentorientation ? TRANSPOSE(BINDGEN(256,2)) :
> BINDGEN(256,2)
>
> (Thanks to James Jones, ITT engineer, for that fix).
>
> Cheers,
> Sean
Thanks for the suggestion, but ...
I originally started out to use the colorbar features built into
the iTools, but I soon discovered that it is intended for indexed
color plots. That is, the colorbar must contain 256 entries. I
haven't made indexed color plots in years (and don't intend to go
back there now), and my colorbars never have 256 entries.
I know that with some effort I could scale them, but that seems to
defeat the purpose of 24-bit color.
So my current solution (you might find this amusing), is to open
a small direct graphics window and draw the colorbar there. Of course,
the colorbar does not appear in any saved graphics files.
There has to be a way to do this. The question does not apply only to
colorbars. What if I want to put an institutional logo in the
annotation layer of my iTools graphic? How do I do that?
Ken
|
|
|