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

Home » Public Forums » archive » Colour Postscript and 'colorbar'.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Colour Postscript and 'colorbar'. [message #7978] Wed, 29 January 1997 00:00 Go to previous message
D.Kennedy is currently offline  D.Kennedy
Messages: 26
Registered: January 1997
Junior Member
I'm using David Fanning's 'colorbar' routine and, while it looks
great on screen, its behaving oddly when I try to produce colour
postscript files. The peak colour in the plot is not the same as
that at the top of the colour bar (though the annotation etc is).
I have not had to work with colour postscript before and am baffled
as to why this isn't working! And the manual, oddly for IDL to be honest,
is useless. I've been tinkering with this for 2.5 hours now. *sigh*
Anyone see where I'm going wrong here?
(I did set 'loadct, 3, ncolors=100' and use the 'ncolors=100' parameter
in the call to 'colorbar' but all I got then was a partially B&W ps
output...*sigh*)

The relevant code fragments are:
[Postscript setup]
set_plot, 'ps'
!p.font = 0
ps_filename = ''
read, ps_filename, prompt = 'PS filename: '
device, /palatino, filename=ps_filename, $
font_size = 10, /landscape, /inches, xsize = 10,$
ysize = 7, xoffset = 0.6, yoffset = 10.8, /color, bits=8

[Colour setup and plot]
loadct, 3
max_colour = !d.n_colors
min_colour = 0
; Build an array with a colour for every data point.
colours = bytscl(n, top = max_colour) + min_colour
; Plot the data
FOR counter=0, (n_elements(l)-1) DO BEGIN
POLYFILL, CIRCLE(l(counter), b(counter), beam_radius),$
/FILL, color=colours(counter)
ENDFOR

[Call 'colorbar']
colorbar, /vertical, position=[0.92, 0.10, 0.95, 0.90],$
divisions=8, bottom = min_colour, $
max = n_max, min = n_min, format='(E10.1)', $
title = 'Column Density', color=0, /pscolor

--
David Kennedy, Dept. of Pure & Applied Physics, Queen's University of Belfast
Email: D.Kennedy@Queens-Belfast.ac.uk | URL: http://star.pst.qub.ac.uk/~dcjk/
Hi! I'm a .signature virus! Copy me into yours and join the fun!
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Circle drawing request.
Next Topic: display many color images

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

Current Time: Wed Oct 08 17:00:32 PDT 2025

Total time taken to generate the page: 0.00440 seconds