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

Home » Public Forums » archive » Re: PV-WAVE and possibly IDL color maps
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
Re: PV-WAVE and possibly IDL color maps [message #14410] Tue, 23 February 1999 00:00
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
John Black wrote:
> I'm using PV-WAVE version v6.21a on a DEC alpha runninx DEC UNIX.
> I was wondering if someone has a color map that has 10 different colours in it.
> I want to plot 2d data from 9 different classes. I want to plot to screen and
> printer, so I can use white on the screen and black on printer for one of the
> classes and the axes, labels etc.

Give this a go (it's IDL, but PV-Wave will probably work):

;---cut here---
PRO COLORS, START = START

;+
; Purpose:
; Load the sixteen McIDAS graphics colors into the current color
table.
;
; Usage:
; COLORS
;
; Input:
; None
;
; Output:
; None
;
; Optional Keywords:
; START Start index in the color table where the McIDAS graphics
; colors will be loaded (default = 0).
;
; Notes:
; The color table assignments are as follows
; 0 => black
; 1 => magenta
; 2 => cyan
; 3 => yellow
; 4 => green
; 5 => red
; 6 => blue
; 7 => white
; 8 => navy
; 9 => gold
; 10 => pink
; 11 => aquamarine
; 12 => orchid
; 13 => gray
; 14 => sky
; 15 => beige
;
; Example:
;colors
;xyouts, 0, 0, 'Magenta', /device, color=1
;xyouts, 0, 100, 'Red', /device, color=5
;xyouts, 0, 200, 'Green', /device, color=4
;xyouts, 0, 300, 'Blue', /device, color=6
;
; Author:
; Liam.Gumley@ssec.wisc.edu
;-

;- Check keywords

if n_elements( start ) ne 1 then start = 0

;- Load McIDAS graphics colors

r = [0,255,0,255,0,255,0,255,0,255,255,112,219,127,0,255]
g = [0,0,255,255,255,0,0,255,0,187,127,219,112,127,163,171]
b = [0,255,255,0,0,0,255,255,115,0,127,147,219,127,255,127]
tvlct, r, g, b, start

END
;---cut here---

Note: If you want Postscript output, don't forget to do the following:

SET_PLOT, 'PS'
DEVICE, /COLOR, BITS=8, ...

Cheers,
Liam.

---
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Byte to Real conversion
Next Topic: contour and latitude circles

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

Current Time: Wed Oct 08 17:25:29 PDT 2025

Total time taken to generate the page: 0.00540 seconds