Grapher primarily uses data files and Grapher files. Grid files can be used to create maps. Image files and vector data files can be imported into plot documents. There are three types of Grapher files: Grapher .GRF, .GPJ, and .GRT files. The type of file you create when saving your project should be determined by how you wish to link the plots and their data:
The Grapher File (*.grf) file stores a link to the data file(s) used by the plots. Data files are saved separately from the GRF file. A GRF file and one or more data files are necessary to open a GRF file.
The Grapher Project (*.gpj) file embeds the data for the plots in the GPJ file. When opening a GPJ file, the plots are recreated exactly as they were saved. No outside data file is necessary to open a GPJ file.
The Grapher Template (*.grt) file does not embed the data nor store links to the data. Only the plot and graph properties and layout are saved. When opening a GRT file, Grapher will prompt you for the data files to use for your plots.
Grapher .GRF files contain all of the information necessary to reproduce the graph, except for the data. When you save a Grapher file, all the scaling, formatting, and parameters for the graph are preserved in the file. Grapher .GRF files save a link to the data and do not store the data internally in the file. For example, if a .GRF file needs to be sent to a colleague, you would need to send the data file(s) used to create the graph in addition to the .GRF file. This format is preferred for graphs where the data changes and needs to link to the external source data file. When opening a GRF file, the data files are reloaded into Grapher. If the data files haven't changed, the plots will look the exact same as when they were saved. However, if the data files have been changed, the plots will automatically update to reflect the changes in their source data. If the data files can't be found, Grapher will prompt you for the data files to use for your plots.
Grapher .GPJ files store all of the information necessary to reproduce the graph including embedding the data. All scaling, formatting, and parameters for the graph are preserved in the file. If a .GPJ file needs to be sent to a colleague, you would only need to send the .GPJ file. This format is preferred when you want to have the data and the graph contained in a single file and the data does not change often.
Grapher .GRT files are used to create a template with set graphing preferences. A saved template file does not contain a reference to a specific data file. This means that once the template graph is created, you can use the template with any data set. You can use the template to set options such as the number of decimal places on axis tick mark labels, label angles, axis labels, graph titles, line plot colors, fill colors, symbol size, or any other graphing option. If a .GRT file is sent to a colleague, they can use their own data set with the file to create a graph based on the specifications in the template file. This format is preferred when the layout of the graph needs to remain consistent with a variety of similarly formatted data files.
In most cases, there is a prompt for a data file when you create a graph in Grapher. Data files can be imported from a variety of sources, such as ASCII text files, Excel files, or database files. Data can be entered directly into Grapher’s worksheet if the files do not already exist. The data needs to be in column and row format. Each row represents a single point on most plots. The columns contain the different variables to be represented on the plot. Data files can also be created and saved in Grapher's worksheet. Some of the most commonly used data types are described in the following sections.
ASCII files are generic format files that can be read or produced by most applications. There are three common ASCII data formats: .DAT, .CSV, and .TXT. These files can also be imported into most applications, including word processors, spreadsheets, and ASCII editors. The files differ in the types of delimiters, or column separators, between the data. ASCII files do not contain any worksheet formatting information such as row height, column width, or cell formatting. This format does not have a limitation on the number of rows or columns.
Microsoft Excel .XLS, .XLSX, and .XLSM files contain data and retain some cell formatting in Grapher. Some information, such as formulas, is ignored. Excel files can preserve all formatting information available in the Golden Software worksheet. An Excel 2003 .XLS worksheet has a 65,536-row limit and a 256-column limit; therefore, this format cannot be used to store very large data sets. An Excel 2007 .XLSX worksheet has a 1,048,576 row limit and a 16,384 column limit.
To save all the formatting, formulas, and worksheets in an .XLS or .XLSX file, you can use Excel directly in Grapher. Use the File | Open Excel command to utilize all of Excel’s features and create graphs in Grapher. Excel disables the save command, so you can only use the Save As command and save to a new .XLS or .XSLX file.
Use the File | Save To Multi-Sheet Excel File command to save multiple worksheets in a single Excel document.
A file can be saved in an Excel format from Grapher worksheet, but only one worksheet can be saved when using the File | Save or File | Save As command. If a multi-worksheet Excel file is opened and saved as an .XLS or .XLSX file from the Grapher worksheet, be aware that only the single worksheet is saved in the document. If the existing file is overwritten, all the unused worksheets are destroyed. In this case, a warning message is issued. The message reads: Saving this worksheet will destroy all but one of the sheets in the existing *.xls, *.xlsx file. To overwrite the file, click OK. To choose a different file name, click Cancel.
In Grapher, graphs can be created from Access .ACCDB and .MDB files and dBase .DBF files directly without first converting to a new worksheet. A graph is created directly from the database file and will reference the database. Changes made in the database table will automatically update the graph.
Other database formats can be imported into Grapher’s worksheet. Click the File | Open command. In the Open dialog, click the Database button. Step through the dialogs to import the file and the database is converted into a worksheet format. These files cannot be saved in their native format, but you can save the files in any of the available worksheet formats by clicking the File | Save As command.
Grid files are used to produce grid-based contour and surface maps in Grapher. Grid files contain a regularly spaced rectangular array of Z values organized in columns and rows. Grid files can be imported from a wide variety of sources. For example, the contour grid map.GPJ sample file uses a Surfer .GRD file to create an XY contour grid map.
File Format Chart