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

Home » Public Forums » archive » Re: Why plots shown on screen and postscript are different?
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: Why plots shown on screen and postscript are different? [message #65086 is a reply to message #65083] Wed, 11 February 2009 06:02 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
T.H. writes:

> I've found that most of the time postscript plotting is more trouble
> than it's worth. If I have a plot on screen that I wish to keep I
> usually save it as PNG using a command something like.......
>
> WRITE_PNG, filename, TVRD()

Humm, well, we all have our own standards, I guess. :-)

This notion of how to write a program that looks good
on the display and in a PostScript file comes up over
and over. It really is quite simple to do, and the clues
are all over my web page, although oddly they have never
been collected in a single article. I should do that if
I ever get a break from my stats homework. :-(

The basics are quite simple. Protect non-PostScript
commands in your program. What are "non-PostScript
commands"? There are only a handful:

Erase
WSet
Window
Device, Decomposed=1

You "protect" them like this (demonstrated with the
Window command):

IF (!D.Flags AND 256) NE 0 THEN Window

Next, you take care that you use a minimum number of
system variables to affect your plots, etc. Rather, use keywords
on the Plot commands themselves whenever possible.

Then, you have to set the PostScript device up appropriately.
I always use PSConfig for this. You can use PSConfig with a
graphical user interface or not. It is up to you.

And, finally, you typically have to choose a hardcopy or
true-type font. I typically use true-type fonts.

I accomplish setting up the PostScript device, getting my
fonts correct, etc. with PS_START. This will also make
the PostScript output have the same aspect ratio as your
current graphics window (a property of PSConfig), so what
you get in PostScript looks very much like what you see
on your display. I close everything up with PS_END.

PS_END has the added ability to make JPEG, PNG, and TIFF
file output from the PostScript output, using ImageMagick,
which creates image output with very nice looking fonts,
suitable for viewing in presentations, on a web page, etc.

All of the programs I mentioned are part of the Coyote
Library:

http://www.dfanning.com/documents/programs.html

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
Previous Topic: why the idlgrwindow select can't performant??!!!
Next Topic: Why plots shown on screen and postscript are different?

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

Current Time: Sun Oct 12 11:14:04 PDT 2025

Total time taken to generate the page: 0.88677 seconds