|
Re: Postscript colour sampler? [message #45423 is a reply to message #45410] |
Thu, 08 September 2005 06:03  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ben Panter writes:
> I'm pretty sure this will be easy to do with a big grid of
> polyfill's, but I thought I would just do a quick check to see if anyone
> has already done it, thus saving me half an hour? I'm after nothing more
> complex that colour + number on a PS page.
I think CINDEX does what you want. I'd just add a "Send to PostScript"
button. :-).
http://www.dfanning.com/programs/cindex.pro
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: Postscript colour sampler? [message #45425 is a reply to message #45423] |
Thu, 08 September 2005 06:00  |
Ben Panter
Messages: 102 Registered: July 2003
|
Senior Member |
|
|
Ben Panter wrote:
> I'm pretty sure this will be easy to do with a big grid of
> polyfill's, but I thought I would just do a quick check to see if anyone
> has already done it, thus saving me half an hour? I'm after nothing more
> complex that colour + number on a PS page.
I decided that it would be even easier than a 30 minute job, and indeed
it was. Just in case anyone else wants it, reproduced below.
Ben
PRO bp_plot_ct, ct_num, file=file
;produces a postscript out colour sampler for a loadct set
;ct_num if specified loads that colour table
;file is the filename for the ps output.
if keyword_set(file) eq 0 then filename='PLOTS/ct.ps'
device, filename=file, /color, bits_per_pixel=8
if n_elements(ct_num) ne 0 then loadct, ct_num
plot, findgen(17), /nodata, title='Colour Table', xst=-1, yst=-1, ticklen=0
k=-1
for i=0,15 do begin
for j=0,15 do begin
k++
polyfill, [i,i+0.5,i+0.5,i],[j,j,j+1,j+1],color=k
xyouts, i+0.5, j+0.5, strtrim(string(k),2), charsize=0.5
end
end
device, /close
END
--
Ben Panter, Garching, Germany.
Email false, http://www.benpanter.co.uk
or you could try ben at ^^^^^^^^^^^^^^^
|
|
|