doc Icon

Save a Plot Document

You can use the Save or Save As... commands to save any plot as a PublishPlot document. Prior to version 3.0, PublishPlot supported two file types, but now only one style is used. A file can be saved using either extension ppltj or extension pplot (if no extension provided, ppltj is used). The final result is always the same and is a human-readable, plain-text document.

Prior to version 3.0, pplot files were binary files. The challenge of continuing to support binary files is that Apple keeps changing the methods for archiving and unarchiving binary data. The use of a plain-text style avoids needing changes every time Apple-provided methods change. Although version 3.0 only saves plain-text files, it can still read any binary pplot created by earlier versions of PublishPlot.

This switch to plain-text files also provides compatibility with with a Java version of PublishPlot currently in development (called PublishPlotJ).

Note: when saving files, any plotted data set feature that corresponds to starred PublishPlot settings are only saved in the file if they differ from the current default settings. The advantage of this approach is that changes to your preferred plot styles will be applied to previous files when they are re-opened. A disadvantage is that if customizations to a previous plot conflict with your new settings, the revised appearance of that plot might not be ideal. Hopefully the advantages of this approach outweigh the disadvantages.

Advanced Users: If needed, all PublishPlot documents can now be opened and edited in text editing software. Plotted data sets are stored in the file using the table format for plots. Other plot elements are stored with lines having mostly-self-defining commands followed by a value. Advanced users could edit files either to recover data or to accomplish things not available in PublishPlot (such and repositioning and alignment of annotations)

pdf Icon

Export PDF Document

You can convert any plot to a PDF document as follows:

import Icon

Export Table of Plot Data

Your can export the plot data by choosing the Text File... menu command in the Export submenu. The data will be exported as a plain-text, tab-delimited file with all data sets in the plot saved as one large table. See help on customizing plotted data if you want to export data for a single data set rather than for all data sets.

The table will include commands that save settings for each data set and save the plot axis titles. The remaining lines have all the data in which the first column will be the x coordinate and remaining columns will have data and possibly error bars from the various data sets. The x data will be sorted even if the input plot data were not sorted. See the format for PublishPlot tables for more details.

You can edit the exported data and then re-import that file (by using the Import... menu command or by dragging the file onto a PublishPlot document) to plot the new data. The re-import will use the table commands to recover all settings for plot data and set the plot axis titles, but the import will not restore information about plot annotations (labels and arrows) or about the settings for the axes, frame, and background colors. That information is not in the exported table. In other words, this export is not intended for archival storage of plot graphics; for that purpose simply save the plot document as a native PublishPlot document. The main use of the export is when you want to open the data for editing and spreadsheet software.