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

Home » Public Forums » archive » Re: Postscript-problem... :((
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: Postscript-problem... :(( [message #10280] Fri, 14 November 1997 00:00 Go to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
A.Kuhr wrote:

> Thank you very much, now not only an orange rectangle... :))))
>
> But 2 other problems occured.... :(((
>
> - the resolution of the printed postscript is very :((( to, like gif.....
> how get a 'nicer' picture...?
>
> - something goes wrong with the colormap.
> on the screen I have colors from blue to red, on the ps only from
> blue to yellow...??
> whats going wrong..?

Astrid,

Try the routine found at the end of this message (colors.pro). I use it to
define 16 graphics colors, usually starting at index 0 in the color table.
See the example in the program code. To use it with Postscript, try this:

;- Do this once before you create the first graphics window in a new IDL
session
device, decomposed = 0

;- Turn on color Postscript output to 'idl.ps'
current = !d.name
set_plot, 'PS'
device, /landscape, /color, bits = 8

;- Load the graphics colors
colors

;- Insert your plot commands here
xyouts, 0.0, 0.05, 'Magenta', /normal, charsize = 5.0, color = 1
xyouts, 0.0, 0.25, 'Red', /normal, charsize = 5.0, color = 5
xyouts, 0.0, 0.50, 'Green', /normal, charsize = 5.0, color = 4
xyouts, 0.0, 0.75, 'Blue', /normal, charsize = 5.0, color = 6

;- Turn off Postscript output (very important!)
device, /close
set_plot, current

There are a few additional tricks if you want to display images with a
separate color table, but this should get you started.

Cheers,
Liam.

;----------
pro colors, start = start

;+
; Purpose:
; Load the sixteen McIDAS graphics colors into the current color table.
;
; Calling Sequence:
; COLORS, START = START
;
; 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, 0.05, 'Magenta', /normal, charsize = 5.0, color = 1
;xyouts, 0.0, 0.25, 'Red', /normal, charsize = 5.0, color = 5
;xyouts, 0.0, 0.50, 'Green', /normal, charsize = 5.0, color = 4
;xyouts, 0.0, 0.75, 'Blue', /normal, charsize = 5.0, color = 6
;
; Revised:
; 24-JULY-1996 Liam Gumley, CIMSS/SSEC
;-

;- check keywords

if n_elements( start ) eq 0 then start = 0

;- load McIDAS graphics color tables

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
;----------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Metrics for IDL programs
Next Topic: CGM output from object graphics

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

Current Time: Wed Oct 08 19:09:39 PDT 2025

Total time taken to generate the page: 0.00636 seconds