Filename variable from device? [message #64472] |
Mon, 05 January 2009 08:45  |
dr.paul.woods
Messages: 2 Registered: January 2009
|
Junior Member |
|
|
In IDL, I wondered if it was possible to store the output filename
used in the DEVICE command as a variable, so that you can print it,
etc.? e.g.:
if keyword_set(ps) then begin
displaycolors=!D.N_colors
set_plot,'ps'
device,filename='output.ps',/color,/cmyk,bits_per_pixel=8
print,"Output written to ",filename
endif
|
|
|
|
|
Re: Filename variable from device? [message #64561 is a reply to message #64472] |
Tue, 06 January 2009 04:50   |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
dr.paul.woods@gmail.com schrieb:
> In IDL, I wondered if it was possible to store the output filename
> used in the DEVICE command as a variable, so that you can print it,
> etc.? e.g.:
>
> if keyword_set(ps) then begin
> displaycolors=!D.N_colors
> set_plot,'ps'
> device,filename='output.ps',/color,/cmyk,bits_per_pixel=8
> print,"Output written to ",filename
> endif
Well sometimes it is much more important to know how you have done this
damn ps file.
So we wrote that info into each ps file
%!PS-Adobe-3.0
%%PLOTINIT: Tue Jan 6 13:46:20 2009
%%PLOTINIT: /private/20090106/test.pro
%%PLOTINIT: 100 Read, Write, New, No Close, Reserved my_plot.ps
%!PS-Adobe-3.0
%%BoundingBox: 0 0 595 841
%%Title: Graphics produced by IDL
cheers
Reimar
|
|
|
|