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

Home » Public Forums » archive » Colour Tables
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Colour Tables [message #14728] Fri, 26 March 1999 00:00 Go to next message
Phil Aldis is currently offline  Phil Aldis
Messages: 11
Registered: February 1999
Junior Member
Okay does anyone have a good routine for creating colour tables - because I
can't get xpalette to work. It is one of the most unintuitive programs I've
ever seen. The interpolating thing is quite random and the fact that you have
to keep moving off a square then back on to see how it's chnaged is quite
frankly very annoying.

What I'd really want is nothing too fancy. The best situation would be if it
was like the screen you can get to someone from xpalette where you add
control points and stuff. Well if you could do that on a plot which had range
000000 -> FFFFFF and then add the control points and the prog used congrid to
make the table.

If no-one's written one then I think I'll do it. Any suggestions? Have others
had the same annoyances with xpalette?

Cheers,
Phil

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Re: Colour Tables [message #14814 is a reply to message #14728] Fri, 26 March 1999 00:00 Go to previous messageGo to next message
mallors is currently offline  mallors
Messages: 76
Registered: November 1997
Member
[Posted and mailed]

In article <7dfd41$48g$1@nnrp1.dejanews.com>,
philaldis@geocities.com writes:
> Okay does anyone have a good routine for creating
> colour tables - because I
> can't get xpalette to work. It is one of the most
> unintuitive programs I've
> ever seen. The interpolating thing is quite random
> and the fact that you have
> to keep moving off a square then back on to see
> how it's chnaged is quite
> frankly very annoying.
>
> What I'd really want is nothing too fancy. The best
> situation would be if it
> was like the screen you can get to someone from xpalette
> where you add
> control points and stuff. Well if you could do that on a
> plot which had range
> 000000 -> FFFFFF and then add the control points and the
> prog used congrid to make the table.
>
> If no-one's written one then I think I'll do it.
> Any suggestions? Have others
> had the same annoyances with xpalette?

Well, I've not used xpalette, but I do have an object that will
create indexed color tables. By default the object contains
a six color table, but you can define your own tables. If you
want to select the colors interactively, then this won't help
you. It will allow you to define a set of colors, then let
the user select from those colors. See

http://cspar.uah.edu/~mallozzir/software/idl/info/color_obj. html

Maybe this will help you, or perhaps you could subclass
it to do what you want.


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
Robert S. Mallozzi 256-544-0887
Mail Code ES 84
Work: http://www.batse.msfc.nasa.gov/ Marshall Space Flight Center
Play: http://cspar.uah.edu/~mallozzir/ Huntsville, AL 35812
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
Re: Colour tables [message #22018 is a reply to message #14728] Tue, 10 October 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Charles Kilburn (C.Kilburn@rl.ac.uk) writes:

> Does anyone know how to save a colour table that you have made in
> XPALETTE? Using MODIFYCT seems to be the only way, but it needs 256
> element vectors, and R_ORIG, R_CURR etc. are only 235 elements under
> Windows. Loading colour tables made with them leaves a band of 20 odd
> white colours at the top.

The easiest way to save a color table, probably, is with
the SAVE command:

TVLCT, r, g, b, /Get
colors = Transpose([[r], [g], [b]])
SAVE, File='mycolors.sav', colors

Then, when you need it:

RESTORE, 'mycolors.sav'
TVLCT, colors

This is best if you want to retain specific colors at
specific index numbers.

Or, if your color table contains smooth graduations in color,
you can always use the good ol' Congrid command:

TVLCT, r, g, b, /Get
ModifyCT, 41, 'mycolors', Congrid(r, 256, /Interp), $
Congrid(g, 256, /Interp), Congrid(b, 256, /Interp)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Colour tables
Next Topic: % Internal error: Unable to set pixel format.

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

Current Time: Wed Oct 08 18:40:54 PDT 2025

Total time taken to generate the page: 0.00718 seconds