TextEdit Icon

Creating a Plot

Although you can edit data sets right in PublishPlot, the recommended method for creating plots is to enter data into other software and then drag and drop (or copy and paste) the text onto a PublishPlot document or Import... the file. The basic steps are:

  1. Open a new or existing plot document (using the New or Open commands in the File menu).
  2. Use any text editing or spread sheet software to enter or create the data. The data should follow the simple PublishPlot rules for a table of data.
  3. If the data-entry software supports drag and drop, select the table and drag it to any open PublishPlot document.
  4. If drag and drop does not work (e.g., in Microsoft Excel), you can alternatively select the table and copy it in the editing software and then click on any PublishPlot document and choose Paste from the Edit menu.
  5. Another alternative is to save the table to a plain text file. You can then either drag the saved file from the Finder to any open PublishPlot document, or use the Import... menu command to select the file and have it plotted.

Numeric Plots and Bar Charts

Note that PublishPlot is mostly designed for "numeric plots" that use numeric values along both the x and y axes, but it can also create bar charts where the x axis uses text labels instead of numbers. Because these two plot styles handle the x axis differently, each PublishPlot document can have one or more numeric plots or one or more bar charts, but the two cannot be mixed in the same window. Any attempt to drag and drop (or copy and paste or import) a data set incompatible with the current window will be rejected (and a message will explain why).

TextEdit Icon

Adding a Data Set

Another way to add a plot is to use the Add Data Set... menu command. This command will display a sheet on the plot window with the following options:

  1. Enter a name for the new data set. It usually a good idea for each plot in a plot document to have a unique name.
  2. Choose line style and symbol type for plotting the new data (all other options for the plotted data can be customized once created).
  3. If you have copied text from another application that contains a table of data compatible with the current plots, the two radio buttons let you decide to use that text ("Use clipboard") or just create a new data set with "Two random points". If the clipboard does not have a valid table, the radio buttons will be disabled and created plots will always start with two random points.
  4. Click "Add Plot" to create a numeric data set, "Add Bar Chart" to create a bar chart data set, or "Cancel" to exit without creating a data set. Note that both buttons will only be available if the current document has no current data sets. Adding a data set to other documents will have only "Add Plot" for numerica plot documents or "Add Bar Chart" for bar chart documents.

Once the new data set is created, it will be selected and the Inspector window will open. If you created data from the clipboard, the Inspector will open with the pane to customize the plot appearance. If you created data with two random points, the Inspector will open with the pane to edit the data points.

Note: If you choose "Use clipboard" and the available table has commands to set the plot name, line style, or symbol type, those settings will be used instead of the ones you choose in the Add Data Set... sheet of options.

Note: Adding the first bar chart to an empty document will ignore your selected line style and symbol type and instead use your previous options for adding a bar chart (which, by default, will be vertical bars without connecting lines).

TextEdit Icon

Example Plot

To try a sample plot, create a new document, select the table in the following block, and drag the text on top of the new plot window (or copy it, click on new window and use Paste from the Edit menu, or use the Add Data Set... command and choose the "Use clipboard" option).

#setColor      black
#setLineWidth   0.200000
#setName        sin(x)/x
0         1.0
0.01      0.999983
0.535789  0.952837
1.06158   0.822479
1.58737   0.629887
2.11316   0.405314
2.63895   0.182552
3.16474  -0.00731249
3.69053  -0.141383
4.21632  -0.208585
4.74211  -0.210784
5.26789  -0.161285
5.79368  -0.0811549
6.31947   0.00574105
6.84526   0.0778561
7.37105   0.120151
7.89684   0.126517
8.42263   0.100043
8.94842   0.0512431
9.47421  -0.00521547
10       -0.0544021

Notice the first few lines of the table beginning in "#" provide commands to set the plot style. You can use more commands to set styles within your tables. Alternatively, you can set any styles within PublishPlot after creating the plot.