How do I create a hardcopy version of my plot?
The print_window routine creates a hardcopy version of the current window. It can be called with no, one, or two arguments:
print_window() print_window("fig") print_window("fig.png") print_window("fig", ["format", "png"]) print_window("fig", ["fittopage", True, "pagesize", "letter", "clobber", True]) print_window("fig".pdf, ["fittopage", True, "pagesize", "letter", "clobber", True])
If called with no arguments the plot is sent as a postscript file to the default printer, otherwise the first argument gives the start of the file name (the suffix is determined from the output format). The default output format (as given by the export.format preference setting) is "ps", so the second example creates a postscript format file called fig.ps. The third and fourth examples show how to override the format setting to create a PNG format file called fig.png. The following formats are available: ps, eps, pdf, png, and jpg.
The last-but-one example creates fig.ps, overwriting it if it already exists, and makes the output US letter sized (the aspect ratio of the on-screen plot will be retained since the default value for export.keepaspect is true).
The print_window() routine can be called more than once for the same visualization.
Using a print dialog (GUI) to control the output
If print_window is called with printdialog set to True then a GUI is displayed which allows you to control how the output is created (such as the format, page size, and orientation). It can also be called directly from the ChIPS GUI.
This setting can be changed globally - so that all print_window calls will use the GUI - by saying
or just for an individual call by saying
or, to seed the filename,
print_window("plot", ["printdialog", True])
In order to support XQuartz 2.7.8, the vector output formats on OS-X - that is, postscript variants and PDF - do not support True Type font formats loaded by the load_font function. They are supported on Linux and in all bitmap formats.