;+ ; NAME: ; PSOPEN ; PURPOSE: ; Opens a file for PostScript graphics output ; CATEGORY: ; Utility ; CALLING SEQUENCE: ; PSOPEN,pfile,font=font,portrait=portrait,landscape=landscape $ ; ,color=color,longpage=longpage ; INPUTS: ; pfile = string specifying name of PostScript output file to create ; KEYWORD PARAMETERS: ; font: specifies PostScript font other than default (e.g., 'times') ; portrait: specifies portrait orientation on page (default) ; landscape: specifies landscape orientation on page ; color: specifies color PostScript output, 8 bits per pixel ; longpage: specifies full length of page available for plotting ; ; Available fonts include AVANTGARDE, BKMAN, COURIER, HELVETICA, ; PALATINO, SCHOOLBOOK, TIMES, ZAPFCHANCERY, ZAPFDINGBATS ; ; OUTPUTS: ; None ; OPTIONAL OUTPUT PARAMETERS: ; None ; COMMON BLOCKS: ; PS_STUFF,Pfont,Dname,Ps_filename ; used by CLOSE_PS to reset font, graphics device type, and to enable ; it to print a ^D to the file for compatibility with QMS printer ; SIDE EFFECTS: ; Opens a file for plotting; sets plot type to PostScript; ; sets !P.FONT to 0 (if a font change requested) ; RESTRICTIONS: ; None known. ; PROCEDURE: ; ; MODIFICATION HISTORY: ; T.J.Hughes, HIA/NRCC , November 30, 1990 ; D. P. Steele, CNSR/UofC, April 21 1993, modified to accept command ; line parameters; added color output option ;- PRO PSOPEN,pfile,font=font,portrait=portrait,landscape=landscape $ ,color=color,longpage=longpage COMMON ps_stuff,pfont,dname,ps_filename nfont='' IF KEYWORD_SET(font) THEN nfont=',/'+font orient=',/PORTRAIT' IF KEYWORD_SET(landscape) THEN orient=',/LANDSCAPE' ystuff='' IF KEYWORD_SET(longpage) THEN ystuff=',YSIZE=22.6,YOFFSET=3.46' ps_filename=pfile dvfile="'"+pfile+"'" dname=!D.NAME pfont=!P.FONT SET_PLOT,'ps' dev_string='DEVICE,FILE='+dvfile+orient+nfont+ystuff IF KEYWORD_SET(color) THEN dev_string=dev_string+',/color,bits_per_pixel=8' istat=EXECUTE(dev_string) RETURN END