;printpscolor1.pro can be used to initiate creating a postscript file of an ;idl plot. (Finishing the postscript file and returning to plotting on ;the screen can be done by using printps2.pro) ;Use is as follows: ; printpscolor1,'filename','type' ;Where ; 'filename' = string of filename and path for postscript file ; example: '/data/davis/wlef/flux.ps' ; 'type' = string of file type. ; Choices: 'landscape' or 'portrait' ; ; Note: This code has been written to use the full page for ; figures that have multiple graphs using !p.multi or ; mplot.pro (mplot.pro is in /davis/s1/lib/general and ; simplifies the use of !p.multi). ; ;Once you have executed the printps1 line you can proceed to create your ;plot pages using plot etc. Then close the postscript file by executing ;printps2 ;which has no input parameters. ; ;Modified from printps1.pro by DMRicciuto on 10/24/01 to allow ;plotting in color. The colors are defined in col_define.pro, which ;I have borrowed from the internet. ;With the current scheme, 32 colors are possible: ; ;number color ; 1 indigo ; 5 violet ; 8 navy blue ; 12 light blue ; 17 dark green ; 21 olive green ; 23 yellow ; 26 orange ; 30 red ; ;in-between numbers are a mix of the two closest colors. ; ;History of printps1.pro: ;Written by BWBerger Fall 1998? Improved to make portrait plotting with ;mplot.pro use full page, and informational header added 10/7/99. pro printpscolor1,fname,type if type eq 'landscape' then begin set_plot,'ps' cmd="device,filename=fname,/"+type r=execute(cmd) endif else begin if type eq 'portrait' then begin set_plot,'ps' cmd="device,filename=fname,/"+type+",xsize=7.5,ysize=9.75,xoffset=.25,yoffset=.5,/inches" r=execute(cmd) endif endelse device, /color col_define, 39, 32 return end