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/
|