Help with CSV files

You can upload a datafile directly, and avoid the laborious entry of lots of data points. This page is to give you some pointers to ease the process.

A "CSV" data file means "Comma Separated Values", and is a format that most spreadsheet programs can write. Each line of a CSV file corresponds to a row in a spreadsheet, where the values from each row are written with a comma to separate them. For example:

Spreadsheet
3.07.30.5star
4.09.11.1box
5.0-3.70.2triangle

In a CSV file this would look like:

3.0,7.3,0.5,star
4.0,9.1,1.1,box
5.0,-3.7,0.2,triangle

In Excel, you can write a CSV file by selecting "File" "Save as..." and picking "Save as Type" CSV.

Each line of the CSV file is parsed to extract the first four values, which are assumed to be an X, a Y, the error on Y, and a symbol name. (If the symbol name is missing or invalid, the default is used). NOTE: if you are doing linear fitting/graphing without error bars, then omit the third column of numbers (the errors on Y).

The overall parsing is not terribly strict: values separated by spaces, tabs commas, or semicolons will all be accepted, and any enclosing quotes are stripped. Extra space (or bare separators) at the beginning of lines is removed, and any fields beyond the first four are ignored.

The numbers do have to be in a valid format, and any lines that have parsing errors are silently discarded. In addition, if you have log scales for the X- or Y-axes, any negative values for those variables will cause that particular line to be silently discarded. And because this CGI does a fit with errors, any error values that are zero or negative are invalid and cause the line to be discarded.

Number formats:

The format for a number in scientific notation is:

SD.DESD

Where S is an (optional) sign (+ or -), D is one or more digits. The mantissa (the D.D part) can be missing leading or trailing digits but not both. The following forms are valid: D.D, D., .D, D

The exponent part (ESD) is optional, and the E can be either upper or lower case.