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

Home » Public Forums » archive » Re: Postscript-problem... :((
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: Postscript-problem... :(( [message #10287 is a reply to message #10280] Thu, 13 November 1997 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
A.Kuhr (rew032@isr141.isr.kfa-juelich.de) writes:

> We have a problem with the postscript output......

Sigh...

> First we produce a plot on the screen, e.g. a xy-plot.
> Than, with a button, we do this:
>
> 'GTest' : $
> BEGIN
> TVLCT, r, g, b, /GET
> Pict = TVRD()
> WRITE_GIF, 'plottest.gif', Pict, r, g, b
> SET_PLOT, 'ps'
> DEVICE, /COLOR
> TV, Pict
> DEVICE, /CLOSE
> SET_PLOT, 'x'
>
> the gif-file is 'very' nice, but no good resolution for printing.
> therefor we store an additional ps-file.
> it has a nice resolution i think, but it shows not the xy-plot,
> only a orange rectangular instead..... :(((((
>
> can anyone help?

If only you had asked this question after next week, then
any of the people in my IDL Programming Techniques course
next week would be able to give you the answer. :-)

The truth is, any of a number of things could be going
wrong. I see several mistakes in this code. And even if
the code worked, I am not sure the screen dump into a
PostScript file will improve your output resolution, since
a screen dump is, well, a screen dump. 72 pixels per inch
is about a good as you can do.

But given that I am on the final pages of my book and I
want to finish the damn thing today, here is what I can
offer as a quick fix. Read the Producing Perfect PostScript
Output articles on my web page. Not everything you need to
know is in there (yet), but you will get some ideas. While
you are there, pick up the program PSWindow.

Then try writing your program like this:

GTest' : $
BEGIN
TVLCT, r, g, b, /GET
Pict = TVRD()
WRITE_GIF, 'plottest.gif', Pict, r, g, b
windowSize = PSWindow()
SET_PLOT, 'ps'
TVLCT, r, g, b
DEVICE, /COLOR, Bits_per_Pixel=8, _Extra=windowSize
TV, Pict
DEVICE, /CLOSE
SET_PLOT, 'x'

If that doesn't give you something other than an orange
rectangle, then I suspect something may be the matter with
the TVRD() command. I generally read from a pixmap instead
of from the display to avoid occasional problems.

Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Metrics for IDL programs
Next Topic: CGM output from object graphics

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

Current Time: Thu Oct 09 20:00:18 PDT 2025

Total time taken to generate the page: 0.64009 seconds