How to use Plot

2007-06-30 18:29:25 -08:00

Plot is a freeware plotting and graphing application for Mac OS X. It’s good, but its documentation and UI are not very effective at explaining its most basic usage. I eventually figured out how to use it, but while it could have been much worse, it certainly wasn’t obvious. So I’m going to give you the 60-second primer that I needed.

If you’re not familiar with the basic concept of a graph: It’s zero or more data points with x and y values, lain out in a graphical depiction mapping the x and y values to positions on the graph. Plot is an application that turns your data into a graph.

This is the graph window in Plot. This is a composite screenshot showing both a bar graph and a line chart.

Plot is organized around buffers. Each buffer is a set of data: zero or more points with x and y values, and x and y error-values.

Buffers are listed and managed in the Data Inspector window, wherein Plot indicates the current buffer with a ➽ character. You edit the contents of the current buffer in the Data View window, and you edit its parameters (most of which concern the graphic display of the data) in the Inspector window (not to be confused with the Data Inspector window).

A new document doesn’t contain any buffers. You create buffers using the New Empty Buffer command in the File menu, or by importing data from various sources, including text files and MySQL databases. It even has a feature to automatically update the buffer from the database periodically, but I haven’t tried it.

You can have as many buffers as you want, and you can change the order in the Data Inspector window, using the ▲ and ▼ buttons.

The Data View is fairly straightforward, but there is one gotcha: Double-clicking the X or Y column header switches the column between number values and date values. I have no idea why this isn’t in a more obvious place instead; I actually threw away a document, thinking that it had become corrupted somehow, before I figured out later that double-clicking the column header is what tells the application to switch it.

Another pitfall: There’s no “your document is unsaved” warning. You may want to unplug your keyboard so you don’t hit ⌘W or ⌘Q by accident. ☺

The text file format is good if you want to store data independently of the Plot document (especially since Plot uses NSKeyedArchiver for its native file format). The text format is very simple: the first column is the x value, and the other column is the y value. Each record is one line. Each file is one buffer. You can import multiple buffers at a time, but you can only export one at a time.

To change the width of a bar in the bar graph, change the “symbolsize” in the Data Style pane of the Inspector. This is also used for the symbol rendering; unfortunately, there’s no way to have both a symbol and a bar graph and have them be different sizes (or colors).

To assign text along the sides of the graph indicating what the axes represent, use the Axis Text field in the Axis pane of the Inspector.

To have a legend (most useful for multiple buffers), first assign each buffer a comment in the Data Inspector, then turn on Plot Legend in the Legend pane of the Inspector. To place the legend, either use the two fields there, or use the “move legend” tool in the Inspector (which you can also activate by pressing the L key in the graph window). The move legend tool allows you to set the position of the legend by dragging within the graph window.

Here's a bar graph generated in Plot looks like.

Here’s the Plot document for the example graph used herein (compressed with bzip2).

Leave a Reply

Do not delete the second sentence.


Warning: Undefined array key "ntt_saved_comment_text" in /home/public/blog/wp-content/plugins/negative-turing-test/negative-turing-test.php on line 143