window graphics resizing after setting to ps device [message #18040] |
Wed, 24 November 1999 00:00 |
Tony L
Messages: 2 Registered: November 1999
|
Junior Member |
|
|
I have a widget routine I've written that outputs an image to a graphics
window where the width and height of the window are adjusted based on
the size of the data array. I have the device set to 'WIN' with the
set_plot command (NT box) and open the window with a line like this:
window,0,title=filename,xsize=factx,ysize=facty
All this works fine, I can plot a number of elements in this dataset
with no problems. However, I then have a widget button that outputs this
to a postscript file. I calculate the image size in a similar way to how
I've done it for the graphics window, open the device using
set_plot,'ps' and set the device using a line such as:
device,/port, file= filename ,/color,bits_per_pixel=8
and output using something like:
tv,bytscl(reim,min=nowmin,max=nowmax,top=!d.table_size-1),$
!x.window(0),!y.window(0),$
xsize=x_pos-!x.window(0),$
ysize=y_pos-!y.window(0),/norm
and then I close the postscript device. All this works fine but when I
then go to plot another data element in the graphics window, and this
ONLY happens after outputting a file to postscript, the plot displays in
the window resized to a smaller horizontal dimension (the window size
remains the same but the x width of the plot is smaller). Anybody have
any quick ideas what I might be doing wrong? I realize it's tough
without looking at all the code. Thanks
Tony
|
|
|