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

Home » Public Forums » archive » Re: Postscript colour sampler?
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
Re: Postscript colour sampler? [message #45410] Thu, 08 September 2005 12:12
Ben Panter is currently offline  Ben Panter
Messages: 102
Registered: July 2003
Senior Member
David,

> I think CINDEX does what you want. I'd just add a "Send to PostScript"
> button. :-).

Yeup - looks good to me. Thanks!

Ben

--
Ben Panter, Garching, Germany.
Email false, http://www.benpanter.co.uk
or you could try ben at ^^^^^^^^^^^^^^^
Re: Postscript colour sampler? [message #45423 is a reply to message #45410] Thu, 08 September 2005 06:03 Go to previous message
David Fanning is currently offline  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 Go to previous message
Ben Panter is currently offline  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 ^^^^^^^^^^^^^^^
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: 2 arrays, average, missing data
Next Topic: Error bars

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

Current Time: Fri Oct 10 06:01:17 PDT 2025

Total time taken to generate the page: 0.87824 seconds