StandardImport - veusz/veusz GitHub Wiki
Veusz reads data in text files stored as columns separated by tabs or spaces. In the import dialog, names should be entered for the datasets to be read, separated by spaces or commas.
Symmetric error bars can be read by following the dataset name by +-, which uses the next column as the error bar value. If the data has asymmetric error bars then the dataset name can be followed by + - or - +, which either uses the next column as the positive error bar and the second next as the negative error bar, or the other way around.
Commas or spaces separate the dataset names and the error bar specifiers. They are interchangeable, except that multiple commas will skip an input columns.
The list of dataset names and error bars is known as the data ''descriptor''.
| x y | x and y with no errors | 2 columns for 2 datasets |
| x,+- | x with symmetric errors | 2 columns for single dataset |
| y + - | y with asymmetric errors | 3 columns for dataset |
| x[1:5]+,- | x_1 to x_5, each with asymmetric errors | 15 columns in total |
| x y +- | x with no errors, y with symmetric errors | 3 columns in total |
| ,x,y,-,+ | skip first column, x with no errors, y followed by negative then postive error bars | 5 columns in total |
Rather than giving dataset names in the import dialog, they can be given in the file using a descriptor statement. Multiple descriptor statements can be used to read multiple sets of data, e.g.
descriptor x +- y +- 1 2 3 4 4 5 6 7 descriptor z q 1 2 3 4
which would read four datasets called x, y, z and q.
Note the square bracket syntax in the examples above, which expands to read multiple columns into multiple datasets. For example, x[1:3] expands to x_1 x_2 x_3, reading three columns in total. foo[1:2],+- expands to foo_1,+- foo_2,+-.
If you leave out the range of values Veusz will read all available columns. If there are five input columns, y[:] will create datasets y_1 to y_5. Similarly y[-1:] would expand to y_-1, y_0, ..., y_3.
Dataset names can by default contain the characters A-Z, a-z, 0-9 and _. If you wish to use other characters, they can be included in back-tick symbols. For example the following would import a dataset "my dataset$$" with symmetric errors:
`my dataset$$`,+-
A file can contain different types of data. To specify the type of data you, put the type specified immediately after the dataset name in round brackets, e.g. x(float), labels(text) or y(float),+-. By default numeric data is assumed.
The following data types are supported:
| numeric, float or number | Standard numerical data, supporting floating point (e.g. -1.23e-10). Special values nan and inf signify not-a-number or infinity. Veusz ignores nan and inf when plotting, causing a break in the line joining points. |
| text or string | Text data for use in labels. If the column contains spaces, tabs or comment characters, the text in the file should be surrounded by quotation marks (e.g. "text" or 'text'). Python formatting is used for text quoting - see [http://docs.python.org/reference/lexical_analysis.html#string-literals] |
| date or time | A time, date or combined data and time. The format read is standard ISO 8601 date/time formatting. Dates are in the format YYYY-MM-DD. Times are in the format HH:MM:SS.ss. Combined data and times use YYYY-MMM-DDTHH:MM:SS.ss, where T is optional between the date and the time. The data are converted to a floating point number in seconds (seconds since or before 1st January 2009). Change the axis to datetime format to show the floating point values as dates or times. |
Error bars are only supported for numerical data.
If any of the #, !, ; or % characters are found without being inside quotation marks, the remainder of the line of text is ignored. Use these characters to add comments to a file.
The read data in blocks option will treat the input file as a number of blocks or sets of data, splitting it along blank lines. _1 will be added to datasets read from the first block, _2 from datasets in the second and so on. For example using a descriptor "x y" in block mode for the following file would create datasets x_1, y_1, x_2 and y_2, each with two data values.
1 2 4 5 7 8 10 11
- Ignore text: ignore lines of text in the input file (enabled by default).
- Prefix: this text is added to the start of each dataset name (including those in descriptor statements). The special text $FILENAME expands to the filename of the dataset being imported.
- Suffix: this text is added to end end of each dataset name.
- Extra tabs or spaces between columns are ignored.
- Extra data at the end of a line are ignored if the descriptor doesn't deal with them.