PuffinPlot is a user-friendly desktop application for analysis of paleomagnetic data, offering a unique combination of features. It runs on several operating systems, including Windows, Mac OS X, and Linux; supports both discrete and long core data; and facilitates analysis of very weakly magnetic samples. As well as interactive graphical operation, PuffinPlot offers batch analysis for large volumes of data, and a Python scripting interface for programmatic control of its features. Available data displays include demagnetization/intensity, Zijderveld, equal-area (for sample, site, and suite level demagnetization data, and for magnetic susceptibility anisotropy data), a demagnetization data table, and a natural remanent magnetization intensity histogram. Analysis types include principal component analysis, Fisherian statistics, and great-circle path intersections. The results of calculations can be exported as CSV (comma-separated value) files; graphs can be printed, and can also be saved as publication-quality vector files in SVG or PDF format. PuffinPlot is free, and the program, user manual, and fully documented source code may be downloaded from http://code.google.com/p/puffinplot/.
 The stepwise demagnetization data used for paleomagnetic studies can be highly variable in character, depending on the magnetic mineralogy of the material sampled and the conditions it has experienced since formation. In simple cases, where a single strong magnetic component dominates, analysis can be practically automatic, with a magnetic direction calculated using the same demagnetization steps along an entire core, or for a suite of discrete samples. At the other extreme, material with weak or complex magnetization may require special measurement protocols, along with individual hand-picking of data points and the application of techniques such as great-circle remagnetization analysis [McFadden and McElhinny, 1988] to recover hidden components of magnetization. PuffinPlot is a user-friendly, cross-platform application for paleomagnetic data plotting and analysis which aims to make the easy analyses easy and the difficult ones possible.
 This technical brief provides a short introduction to PuffinPlot and its capabilities; a full user guide and ample documentation of the program's internal structure are included with PuffinPlot itself (see Software S1 in the auxiliary material).
 In this section, we briefly describe the more significant features of PuffinPlot.
2.1. Obtaining and Running PuffinPlot
 PuffinPlot is a cross-platform program written in Java, and can be run on any operating system with an installed Java runtime (version 5 or greater). The Java runtime is freely available (and often pre-installed) for Windows, Mac OS X, Linux, and other operating systems. Most existing paleomagnetic software either runs on a single operating system (e.g., PaleoMac [Cogné, 2003]) or requires the purchase of supporting software for each operating system on which it is to be run (e.g., UPmag [Xuan and Channell, 2009]). PuffinPlot is distributed free of charge, as is the Java runtime on which it depends. PuffinPlot's source code is freely available on the web for inspection or for re-use in other projects. A full instruction manual is included with the program; the scripting interface and source code are also fully documented. PuffinPlot can be downloaded fromhttp://code.google.com/p/puffinplot/.
2.2. User Interface
 Some paleomagnetic software – for example PaleoMac [Cogné, 2003] – takes an interactive approach, allowing graphical selection of points for analysis. Other programs, for example the Excel macros of Mazaud , operate in “batch” mode, where the analysis parameters are specified in advance and the program runs non-interactively. An interactive program is generally preferable for analyses where the points must be picked by hand, but batch-mode programs can be more efficient for performing a pre-determined analysis procedure on a large volume of data. Some batch-mode programs – for example, the scripts in the PmagPy suite [Tauxe et al., 2010] – operate as command-line programs, allowing input and output to be handled by other programs rather than by a human user. Since they can run without human interaction, such programs are easier to integrate into larger automated workflows.
 PuffinPlot provides the best of both these worlds by offering several levels of control: demagnetization steps can be picked for individual samples, or applied en masseto any number of chosen samples or to an entire suite of data. The sample chooser also makes it easy to scroll rapidly through a data suite, in effect producing an animation of the changes occurring through along a core or section. PuffinPlot also provides a scripting interface, allowing programmed scripts to interact directly with currently opened data files, or to read and process data without any human intervention. PuffinPlot's built-in scripting engine uses the popular Python language, but it can interface with any scripting language which can run on the Java platform.
Figure 1shows PuffinPlot's graphical user interface in a typical set-up for long core analysis.
2.3. Data Import, Processing, and Export
 PuffinPlot can read data from 2G magnetometer files and from the file format used by Steve Hurst's Zplot program. It also has a “custom import” feature, which allows the user to specify the data format; this facility allows most text-based data formats to be read. Both discrete and long core data sets are supported; during plotting, discrete samples are selected using a list of sample names, and continuous data using a slider control to indicate depth. The data capacity is in principle limited only by the size of the computer's memory; in practice, PuffinPlot has been tested with data suites containing thousands of samples and tens of thousands of measurements.
 PuffinPlot can correct data automatically for sample orientation, bedding attitude, and local geomagnetic declination; these parameters can be read as part of the data file and edited within PuffinPlot.
 PuffinPlot incorporates special features for the accurate measurement of weakly magnetized discrete samples. First, special protocols are used during the measurement process: the empty tray is measured before each sample measurement, and the samples themselves are remeasured in different orientations to compensate for any systematic bias in the sensors. The measurements are combined by PuffinPlot to produce a best estimate for the true magnetic moment.
 Using PCA (principal component analysis) [Kirschvink, 1980], PuffinPlot can calculate anchored and unanchored demagnetization directions and fit great-circle paths. It reports MAD (maximum angular deviation) values for all PCA calculations, allowing goodness of fit to be assessed objectively. Site and suite mean directions are calculated usingFisher  statistics or great circle remagnetization analysis [McFadden and McElhinny, 1988]. Mean directions can be calculated for individual site and entire data suites, or across multiple data suites. PuffinPlot can automatically calculate separate mean directions for different hemispheres, allowing easy processing of cores or sections which have experienced geomagnetic polarity reversals. Sites can be explicitly defined, automatically inferred from a sample naming convention, or (for long core data) automatically set from the sample depth within the core. Median destructive fields (or, for thermal demagnetization data, median destructive temperatures) can also be calculated and shown.
Figure 2shows three equal-area plots from PuffinPlot, demonstrating the fitting of a great circle and the calculation of site and suite mean directions.
 AMS (anisotropy of magnetic susceptibility) data can be imported and plotted along with the demagnetization data. In addition, if the PmagPy suite [Tauxe et al., 2010] is installed, PuffinPlot can use it to calculate AMS statistics and plot confidence regions for the AMS data.
 All sample, site, and suite calculations can be exported as CSV files for further processing. CSV files are readable by most spreadsheet, graphing, and data analysis programs.
2.4. Graphing Features
 PuffinPlot shows its data plots on a single, large canvas. The user is free to move and resize the plots on this canvas, or to hide them from view if they are not required. This allows the plot layout to be customized according to individual requirements of the user and the analysis. Layouts can be saved and restored, allowing the user to switch between them quickly.
 PuffinPlot has a wide selection of plot types. It provides the standard paleomagnetic triptych of demagnetization-intensity biplot, equal-area project, and orthogonalZijderveld plot, as well as the “modified Zijderveld plot” or “component plot” in which the vertical projection shows the true inclination for each point. It also offers a range of other plots: equal-area plots for site and suite directions and for AMS data; a histogram of NRM (natural remanent magnetization) intensities; and a newly devised ternary plot for data obtained from the triaxial IRM (isothermal remanent magnetization) demagnetization method ofLowrie . The plot area also includes textual elements, such as a table of demagnetization data and the results of calculations.
 Plots can be printed directly from the program, or exported as PDF (portable document format) files for inclusion in publications; if multiple samples are selected, a multi-page printout or PDF is produced. SVG (scalable vector graphics) export is also available; SVG files are particularly useful for further editing with a vector drawing program or incorporation into larger vector images.
 Data points can be selectively hidden. This can be very useful when only a subset of the treatment steps is of interest: in particular, spurious high remanences (for example from flux jumps, thermally induced alteration, or gyroremanent magnetization) can obscure the useful demagnetization data on a plot. Hidden points can be restored at will, and are still shown on the data table display.
 In addition to the plot in the main window, PuffinPlot can show a sample's demagnetization data as a spreadsheet-like table in a separate window. Columns can be reordered, and the data pasted directly into other programs.
2.5. Custom Annotations
 PuffinPlot's custom annotations are a feature allowing short, categorized notes to be added to each sample in a suite. The categories can be freely chosen. Annotations come in two varieties, custom flags and custom notes.Custom flags embody a true/false value and are intended to record whether a sample fulfils some criterion – for example, “messy”, “low-temperature alteration”, or “multiple components”. Custom notes are intended for adding short items of information which are not automatically inferred by PuffinPlot – for example, “number of components” or “behavior type”. Annotations are saved along with the other data, and are exported as part of the sample data CSV file.
3. Example Workflow
 This section gives a walk-through of a typical PuffinPlot session to give an idea of how its features are integrated with one another. Note that this is only an example; many other ways of working are possible.
 1. The user selects the “Open file” menu item and chooses a folder of long core data files in 2G format. PuffinPlot reads the files in the folder. It ignores any which do not appear to be correctly formatted data files, and warns the user that they have been skipped.
 2. The main display shows demagnetization, Zijderveld, and equal-area plots, along with a data table, for the topmost position in the core. A vertical slider control appears at the left of the window, allowing the user to scroll quickly through the length of the core.
 3. A cursory inspection reveals that, throughout the core, the last few demagnetization steps give no meaningful data, and their data points obscure the more useful data on the graphs. The user selects these points for a single sample, then uses the “Copy point selection” feature to select the corresponding demagnetization steps along the whole core, and the “Hide points” feature to remove them temporarily from the plots.
 4. The user wishes to perform analysis using great-circle intersections [McFadden and McElhinny, 1988]. For this, it is necessary to combine the demagnetization data from several adjacent sampling points. Using the “Set sites by depth” feature, the user instructs PuffinPlot to divide the core into 5 cm slices, defining a site for each group of samples within a slice.
 5. The user fits a great circle to several of the demagnetization steps of one sample, refining the selected points using the displayed MAD value for the circle. After making the fit, the user decides to attempt a provisional analysis of the entire core using the same demagnetization steps.
 6. The user copies the selected demagnetization steps from the current sample, pastes them to the entire suite, and selects “Fit great circle” again. PuffinPlot fits great circles for all the samples.
 7. The user switches on the site mean direction plot, selects the entire suite, and selects “Great circles” to calculate intersection points for each site.
 8. The user selects “Suite means” to calculate mean directions through the whole suite and exports the statistical parameters to a CSV file. Finally the user selects the first 20 samples and prints their data for later perusal, saves the file, and closes PuffinPlot.
 PuffinPlot is a versatile paleomagnetic analysis program which offers as few barriers as possible to its usage: it is freely distributed, runs on all major operating systems, provides a user-friendly graphical interface, and comes with ample documentation. The bulk analysis features reduce the drudgery of analyzing large volumes of data, and the scripting interface allows the more advanced user to extend the program's functionality. Users are invited to contact the author with any comments or suggestions for future improvements.
 PuffinPlot makes use of four software libraries generously released under liberal terms: Jama, a basic linear algebra package; the Batik, iText, and FreeHEP libraries, for graphics export; and Jython, for scripting. During PuffinPlot's development, much valuable testing and feedback was provided by C. Ohneiser, F. Nelson, C. Tapia, and B. Fox. We also thank Gary Acton and an anonymous reviewer for comments and suggestions on the paper and software: significant improvements were made to PuffinPlot as a result of these reviews. Development of PuffinPlot was funded by University of Otago research grants to GSW.