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

Home » Public Forums » archive » Re: Device independent plotting
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Device independent plotting [message #70803 is a reply to message #70797] Wed, 05 May 2010 05:00 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pp writes:

> Move the calls to fsc_color to after the call to set_plot. Also, if
> there were any, after any calls to device that changed the way colors
> are handled. But keep it before the first use of the colors,
> obviously.

Yes, generally speaking, it is easier to write
device-independent color programs if colors are
loaded when they are needed. In practice this means
using FSC_Color with your graphics commands. For
example, you could do this:

; Set up colors for graphics output
axisColor = 'Navy'
dataColor = 'Red'
backgnd = 'White'

; Graphics output.
Plot, ..., COLOR=FSC_Color(axisColor), BACKGROUND=FSC_Color(backgnd)
OPLOT, ..., COLOR=FSC_Color(dataColor)

Of course, it seems somewhat redundant to "define" colors
first, so I usually just do this:

Plot, ..., COLOR=FSC_Color('Navy'), BACKGROUND=FSC_Color('White')
OPLOT, ..., COLOR=FSC_Color('Red')

This conveys the message and works well, to boot! :-)

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Creating a new image from an image input in IDL
Next Topic: Fourier Fitting Data in PV-Wave

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

Current Time: Fri Oct 10 22:58:00 PDT 2025

Total time taken to generate the page: 1.36025 seconds