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

Home » Public Forums » archive » Baffled by color postscript
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Baffled by color postscript [message #14567] Mon, 08 March 1999 00:00 Go to previous message
David R. Wyble is currently offline  David R. Wyble
Messages: 4
Registered: April 1998
Junior Member
OK, I've been through many of David's great web pages, and through the portion
of his book related to the subject. Still, I get only monochrome output, or
none at all. Here is what I am doing. Note that this works perfectly for the X
display (that part between the X-only comments). Running on SGI Octane, IDL
5.0 MIPS

; x,y are 1xn vectors of data
; my_rgb is a 3xn byte values of RGBs for each respective
; element of x,y

; save current device, open postscript
thisdevice = !d.name
set_plot, 'PS', /copy
device, xsize=6, ysize=6, /inches, bits_per_pixel=24, /color

; plot the axes
plot, x, y, /nodata, xrange=[0,20], yrange=[0,20], title=chartTitle
saveColor = !p.color

;;;; X-only code starts
; loop through the data rgb_index() returns the 24 bit color
for i = 0, l-1 do begin
!p.color = rgb_index(my_rgb[0,i],my_rgb[1,i],my_rgb[2,i])
plots, x[i], y[i], psym=4
end

; plot a line at unity, make it the default color
!p.color = saveColor
oplot, [0,20],[0,20]

;;;; X-only code ends

; close it up and reset the device
device, /close_file
set_plot, thisdevice


Any ideas what is wrong? This code produces a postscript file with only the
axes and the line at [0,20],[0,20]. From experimenting with SYMSIZE, I believe
the points are actually plotting, but they are always white. (When I set
SYMSUZE=20, portions of the axes are overwritten, presumably by the large data points.)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: 3D thinning/skeleton computation in IDL
Next Topic: overlay vectors

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

Current Time: Wed Oct 08 15:54:14 PDT 2025

Total time taken to generate the page: 0.00333 seconds