Command Line Parameters

Specify a File

When starting QtiPlot from the command prompt, you can supply the name of a project file:


qtiplot file_name.qti

Other file formats are also accepted: .opj, .ogm, .ogw, .ogg for Origin projects, .qti, qti.gz for QtiPlot projects, .xls, .xlsx for Excel workbooks, .ods, .fods for Open Document Format Spreadsheets, .mat for Matlab files, .tdms for LabVIEW TDM Streaming (TDMS) file format, .db, .dbf, .mdb, .accdb for dBase, MySQL, SQLite and Microsoft Access databases and all the image file formats (raster or vectorial) that can be read by QtiPlot.

The name can also refer to an ASCII file:


qtiplot ASCII_file_name

In this latter case, a new "untitled" project will be created, containing a table or matrix with the ASCII data from the file. The file is read and interpreted using the current settings from the Import -> Import ASCII... command dialog.

Figure 1-4. Starting QtiPlot in French from a macOS terminal.

Command Line Options

Valid options are:

If the file_name refers to a Python script and you use one of the following options: -c (--console), -x (--execute) or -X, you can also enter a list of arguments for the script, like in the example bellow:


qtiplot -c -x /Users/ion/Desktop/hello.py Luca 3

where 'Luca' and '3' are the arguments for the script 'hello.py' to be loaded and executed.

QtiPlot will insert an automatically generated header before your actual script:


import sys
sys.path.append('/Users/ion/Desktop')
sys.argv=['/Users/ion/Desktop/hello.py','Luca','3']
### End of QtiPlot generated header ###

This way the list of arguments is made available to your script. Also, the script path is appended to the execution path, so that you can import other scripts from that folder.

When you save the script, the QtiPlot generated header is removed so that your original script is not modified in any way, provided that you do not delete the commented line.