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

Home » Public Forums » archive » Re: saving plots as .eps
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: saving plots as .eps [message #17502] Tue, 19 October 1999 00:00
James Tappin is currently offline  James Tappin
Messages: 54
Registered: December 1995
Member
Dave Avis wrote:
> I am trying to save a 2D scatter plot as a .eps file. My plot is a plot of
> two vectors, for example
>
> plot xvector,yvector
>
> I have looked at online examples and printed documentation and am still
> having problems. I do
>
> set_plot 'ps'
> device,/ENCAPSULATED ;followed by other stuff
>
> My problem comes when trying to use TV or any of its other incarnations
> (TVSCL, TVRD...). It seems to me that they want a 2D array of the pixel
> values of the plot window. I am not sure how to get this array. I may be
> misunderstanding what TV is trying to do, or I may be going about it the
> wrong way, I'm not sure. Any help is most appreciated.

Unless I'm missing something in what you are trying to do; surely the best way
to do this is just to rerun the same set of plotting commands that generated
the original plot. Reading a screen plot as an image and then making a (E)PS
file of that will give you a very poor quality output compared with what you
get from making the plot directly to the (E)PS file. (A typical IDL window is
a few hundred pixels each side, for line plots PostScript describes the line
as a vector and the print driver converts it to printer dots typically 3-800
per inch).

If you actually really want a screen dump then you need to run:

image=tvrd()
set_plot 'ps'
device,/ENCAPSULATED ;followed by other stuff
tv,image, x0, y0, xsize=xs, ysize=ys
; x0, y0 = lower left corner of image, xs, ys size of image (both in physical
; units)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: ??% TRIGRID: X, Y, or Z array dimensions are incompatible?? what the....
Next Topic: saving plots as .eps

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

Current Time: Wed Oct 08 20:01:08 PDT 2025

Total time taken to generate the page: 0.00590 seconds