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

Home » Public Forums » archive » Re: reverse color table
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: reverse color table [message #72437] Sun, 12 September 2010 04:12
tegus is currently offline  tegus
Messages: 20
Registered: October 2008
Junior Member
On Sep 11, 10:21 am, David Fanning <n...@dfanning.com> wrote:
> tegus writes:
>> I think this will accomplish the same thing without reversing the
>> color table -- just use so me of the PLOT keywords instead:
>
>> LoadCT, 0
>> Plot, Y, BACKGROUND=255, COL=0
>
>> You can also use other color tables if you want to use colors other
>> than black and white.
>
> The suggestion to use keywords is correct. But the
> suggestion to use these particular indices will
> prove disastrous if you want to create a
> PostScript file with this command. Instead,
> you should load drawing colors anywhere
> *except* indices 0 and 255.
>
> A program like FSC_COLOR will take care of
> this detail (and many others) for you:
>
>    Plot, data, BACKGROUND=FSC_Color('white'), $
>      COLOR=FSC_Color('black')
>
> FSC_COLOR is a Coyote Library routine.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

David,

Thanks for the tip regarding PostScript!!

Bill
Re: reverse color table [message #72439 is a reply to message #72437] Sat, 11 September 2010 07:21 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
tegus writes:

> I think this will accomplish the same thing without reversing the
> color table -- just use so me of the PLOT keywords instead:
>
> LoadCT, 0
> Plot, Y, BACKGROUND=255, COL=0
>
> You can also use other color tables if you want to use colors other
> than black and white.

The suggestion to use keywords is correct. But the
suggestion to use these particular indices will
prove disastrous if you want to create a
PostScript file with this command. Instead,
you should load drawing colors anywhere
*except* indices 0 and 255.

A program like FSC_COLOR will take care of
this detail (and many others) for you:

Plot, data, BACKGROUND=FSC_Color('white'), $
COLOR=FSC_Color('black')

FSC_COLOR is a Coyote Library routine.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: reverse color table [message #72441 is a reply to message #72439] Sat, 11 September 2010 05:39 Go to previous message
tegus is currently offline  tegus
Messages: 20
Registered: October 2008
Junior Member
On Sep 10, 4:43 am, bing999 <thibaultga...@gmail.com> wrote:
> Hello,
>
> i want to make a plot which is a D histogram in which the color table
> is black and white (loadct,0).
>
> I need to reverse the color table (reverse_ct.pro) for my plot. But
> when I do that the axis, ticks, labels... disappear because in the new
> reversed color table they are in white.
> Is it possible to force the axis, labels... to be in black and use the
> reversed color table for the histogram only?
>
> thank you in advance!

Hi!

I think this will accomplish the same thing without reversing the
color table -- just use so me of the PLOT keywords instead:

LoadCT, 0
Plot, Y, BACKGROUND=255, COL=0

You can also use other color tables if you want to use colors other
than black and white.

Bill
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Locate pixels that fall within other pixel-geo search
Next Topic: ENVI trying to open files from USGS/EROS

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

Current Time: Wed Oct 08 15:11:24 PDT 2025

Total time taken to generate the page: 0.00596 seconds