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

Home » Public Forums » archive » Re: PostScript Background Color Preference
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 Background Color Preference [message #73584] Thu, 18 November 2010 09:02
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul van Delst writes:

> Simple for you to code...

I'll just say this, making PostScript background colors
other than white is a HELL of lot harder to program
than I ever imagined!!

Getting a background color and then allowing !P.MULTI
plots is a big, big chore. :-(

Anyway, here are new routines that appear to do this correctly.

http://www.dfanning.com/programs/tvimage.pro
http://www.dfanning.com/programs/tvscale.pro
http://www.dfanning.com/programs/fsc_contour.pro
http://www.dfanning.com/programs/fsc_surf.pro
http://www.dfanning.com/programs/fsc_plot.pro

Cheers,

David

P.S. Let's just say the first person who mentions
the word "hack" will be dealing with Coyote and his
gang.

--
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: PostScript Background Color Preference [message #73601 is a reply to message #73584] Wed, 17 November 2010 08:56 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul van Delst writes:

> I reckon just go with white background everywhere by default. People
should be used to seeing white background graphics
> onscreen nowadays.

Yes, you might want to have a look at my new code.
You might be surprised by what you find there. :-)

> Simple for you to code and simple for neophytes to grok what
> will happen when they print.

Well, that's the problem. Writing device independent code
is NOT simple to program! Hence an entire book devoted to
how to do it. In fact, if I weren't writing this book,
I would have had no *idea* how hard this really is. :-)

You probably wouldn't believe how much book chapters have
changed since I made them available, once I took my own
advice and tried to write one of these "easy" programs!

> With NG I just don't worry about it any more
> (i.e. I never use yellow to plot :o)

Yes, I'm trying to bring the same "don't worry about it
anymore" approach to the rest of us, who either can't
upgrade to IDL 8, or who, like me, can't get the damn
thing to run for 10 minutes at a time and have given
up on it. :-)

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: PostScript Background Color Preference [message #73603 is a reply to message #73601] Wed, 17 November 2010 08:42 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
> Paul van Delst writes:
>
>> For default, I'm happy with either a white (ala NG graphics) or black (ala DG graphics) background onscreen - which I
>> interpret as effectively "transparent" so that printouts will be as one expects. I would recommend you adopt a white
>> background so you're seen as being aligned with the bright and sunny future direction of graphics in IDL (i.e. NG)
>
> I *have* adopted a white background. But just
> as you assume black is "transparent" because of
> long exposure to the quirks of IDL, I assume
> background is "white" when I make a PostScript
> file.

By default, yes. That is, if the user doesn't specify *any* background colour.

> My new routines are giving us a new opportunity
> to interpret the world the way it "ought to be",
> rather than the way it "always has been". :-)

I reckon just go with white background everywhere by default. People should be used to seeing white background graphics
onscreen nowadays.

Simple for you to code and simple for neophytes to grok what will happen when they print. The older IDL codgers will
have to make their own way.... :o)

>
> Cheers,
>
> David
>
> P.S. While admiring your "black is transparent"
> approach, I can't help wondering what trick of
> perception you use to get colors that work correctly
> on both black and white backgrounds. :-)

Very low tech, non-scalable solution. In my DG code, I do stuff like:
yellow_color = KEYWORD_SET(ps) ? cyan : yellow
so onscreen I have yellow lines on black background. For PS output, the "yellow" becomes blue on white background.

With NG I just don't worry about it any more (i.e. I never use yellow to plot :o)

cheers,

paulv
Re: PostScript Background Color Preference [message #73604 is a reply to message #73603] Wed, 17 November 2010 08:30 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul van Delst writes:

> For default, I'm happy with either a white (ala NG graphics) or black (ala DG graphics) background onscreen - which I
> interpret as effectively "transparent" so that printouts will be as one expects. I would recommend you adopt a white
> background so you're seen as being aligned with the bright and sunny future direction of graphics in IDL (i.e. NG)

I *have* adopted a white background. But just
as you assume black is "transparent" because of
long exposure to the quirks of IDL, I assume
background is "white" when I make a PostScript
file.

My new routines are giving us a new opportunity
to interpret the world the way it "ought to be",
rather than the way it "always has been". :-)

Cheers,

David

P.S. While admiring your "black is transparent"
approach, I can't help wondering what trick of
perception you use to get colors that work correctly
on both black and white backgrounds. :-)

--
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: PostScript Background Color Preference [message #73605 is a reply to message #73604] Wed, 17 November 2010 08:18 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
> Folks,
>
> I tout in my new graphics commands (FSC_Plot, FSC_Contour, etc.)
> that they "look the same on your display and in a PostScript file".
> But, of course, that's only true if you always use, as I tend
> to, white backgrounds for your graphical output. The joke, of
> course, is that you can have any background color you like
> in PostScript, as long as it's white.
>
> This is not true, you *can* have different colored
> backgrounds in PostScript, but you do have to go to
> some trouble to get them.
>
> Here is my question. I can produce different background colors in
> PostScript in my new graphics commands, but is this what people
> want and expect? My reasoning is that if I use a command and I write
> BACKGROUND='rose', and I want a command that "works everywhere",
> then I should expect a rose colored background everywhere.
>
> But, I can't quite pull the trigger on this. For some reason,
> it's doesn't feel like *exactly* what I want, even with all
> the big talk. What do you think? What would you want?

If I set the background colour explicitly, I expect it to always use that background colour, as with your "rose"
example. So if I do BACKGROUND='black', I expect my printer to go through a lot of toner. Nothing enrages me more than
technology that asks what I want (in this case via a keyword), and then ignores what I tell it. Grrrr.... :o)

For default, I'm happy with either a white (ala NG graphics) or black (ala DG graphics) background onscreen - which I
interpret as effectively "transparent" so that printouts will be as one expects. I would recommend you adopt a white
background so you're seen as being aligned with the bright and sunny future direction of graphics in IDL (i.e. NG)

:oD

cheers,

paulv
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Extracting info from the ASCII file with IDL
Next Topic: Preferences gone mad

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

Current Time: Wed Oct 08 19:16:20 PDT 2025

Total time taken to generate the page: 0.00626 seconds