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

Home » Public Forums » archive » Postscript problem
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
Postscript problem [message #11945] Mon, 08 June 1998 00:00
Tim Abbott is currently offline  Tim Abbott
Messages: 4
Registered: January 1997
Junior Member
Hi,

I have a problem with postscript output from a routine which works
just fine on output to
the display. What I am trying to do is combine image data with plots.
The data consist of a
set of 6 spectra, each of the same number of data points (Nd), which I
concatenate into
a single 2-d array (Ndx6 elements). I am plotting the 6 spectra on an
ordinary plot window
with axes slightly wider than the data range. I then display the image
data in the upper ~10%
of the display, and spread over the same x-range so that the reader may
directly compare the
image data with the spectra (which are, therefore, slices through the
image). This works just
fine on my workstation, but when I try and make a postscript copy,
spectra plot OK, but the image
data runs off the right of the page, with quite the wrong x-scale. To
make matters worse, I
can find nothing wrong with the scaling parameters and the image should
be narrower than
the page (after congridding, it is smaller than the pixel width of the
page). The (image manipulation)
code is given below (I know, it's ratty):

px = !x.window * !d.x_vsize ; x coordinates of plot in device units
py = !y.window * !d.y_vsize ; y coordinates of plot in device units
px(1) = px(0)+(max(w27) - !x.range(0))*(px(1) -
px(0))/(!x.range(1)-!x.range(0))
px(0) = px(0)+(min(w27) - !x.range(0))*(px(1) -
px(0))/(!x.range(1)-!x.range(0))
ipy = py(1)-1.2*(py(1)-py(0))/10.+1

sx = px(1) - px(0) + 1
sy = (py(1)-py(0))/10.
img = congrid(img,sx,sy)
tvscl,img,px(0),ipy

Is there something about the PS driver I'm not understanding...?

Thanks for any help,

Tim

--
Timothy M. C. Abbott, Ph.D. http://www.cfht.hawaii.edu/~tmca/
Resident Astronomer tmca@cfht.hawaii.edu
Canada-France-Hawaii Telescope Tel: +1 808 885 7944
Box 1597, Kamuela, HI 96743 Fax: +1 808 885 7288
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL and COM
Next Topic: Interface for udunits

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

Current Time: Wed Oct 08 18:07:15 PDT 2025

Total time taken to generate the page: 0.00589 seconds