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 
Switch to threaded view of this topic Create a new topic Submit Reply
Colour Postscript and 'colorbar'. [message #7978] Wed, 29 January 1997 00:00
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!
Re: Colour Postscript and 'colorbar'. [message #7983 is a reply to message #7978] Tue, 28 January 1997 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
David Kennedy <D.Kennedy@qub.ac.uk> writes:

> 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 several articles on this topic on my web page, but
try this and see if it doesn't help.

Set_Plot, 'PS', /Interpolate

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
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 15:10:03 PDT 2025

Total time taken to generate the page: 0.00561 seconds