#!/usr/bin/python -tt #======================================================================= # General Documentation """Single-procedure module. See procedure docstring for description. """ #----------------------------------------------------------------------- # Additional Documentation # # RCS Revision Code: # $Id: active2ps.py,v 1.1 2004/02/20 21:49:49 jlin Exp $ # # Modification History: # - 09 Dec 2003: Orig. by Johnny Lin, Computation Institute, # University of Chicago. Passed passably reasonable visual # tests. # # Notes: # - Written for Python 2.2. # - Non-"built-in" packages required: IaGraph # # Copyright (c) 2003 by Johnny Lin. For licensing, distribution # conditions, contact information, and additional documentation see # the URL http://www.johnny-lin.com/py_pkgs/IaGraph/. #======================================================================= #---------------- Module General Import and Declarations --------------- #- Set package version number: import IaGraph_version __version__ = IaGraph_version.version del IaGraph_version #------------------------ Procedure Declaration ------------------------ def active2ps( file ): """Plot active VCS canvas to Postscript file. Input: * file: Filename. String scalar. Output: * Postscript file of plot (landscape). Existing file overwritten. Example: >>> import Numeric >>> from IaGraph.plot import plot >>> from IaGraph.active2ps import active2ps >>> x = Numeric.arange(100.)/Numeric.pi >>> y = Numeric.sin(x) >>> plot(x, y, psym=3) >>> active2ps('file.ps') """ #------------------------ Procedure Executables ------------------------ import IaGraph sysvar = IaGraph.Sysvar() #- IaGraph system variable object v = sysvar.__class__.active_canvas v.postscript(file,'r') del v # ===== end file =====