The QtiPlot Handbook

Ion Vasilief

Stephen Besch

This document is a handbook for using QtiPlot, a program for two- and three-dimensional graphical presentation of data sets and for data analysis.

This manual is organized in several chapters:

-The first chapter describes the main concepts and terms which are used in QtiPlot.

-The second chapter is a tutorial on how to obtain plots from different data sets. It is the one you need to read first to understand the basics of QtiPlot and to be able to draw plots.

-The three following chapters are descriptions of all the commands, buttons and dialogs used in QtiPlot. These chapters are the reference manual of QtiPlot.

- The two following chapters describe more deeply some specific possibilities of QtiPlot, that is the statistical and mathematical analysis of data, and the scripting.

Legal notice: Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts.

Table of Contents
1. Introduction
What QtiPlot does
Command Line Parameters
Specify a File
Command Line Options
General Concepts and Terms
Excel workbooks
Plot Window
Results Log Window
The Project Explorer
Interoperability with other scientific software
Microsoft Excel
LibreOffice and Apache OpenOffice
2. Drawing plots with QtiPlot
2D plots
2D plot from data.
2D plot from function.
3D plots
Direct 3D plot from a function
3D plot from a matrix
Multilayer Plots
Building a multilayer plot panel
Building a multilayer plot step by step
3. Command Reference
The File Menu
File-> New ->
File -> Open (Ctrl-O)
File -> Open Excel
File -> Open ODF Spreadsheet
File-> Open Image File (Ctrl-I)
File -> Append Project... (Ctrl-Alt-A)
File-> Recent Projects
File -> Close
File-> Save Project (Ctrl-S)
File-> Save Project as... (Ctrl-Shift-S)
File-> Save Window as...
File -> Open Template
File -> Save as Template
File-> Print (Ctrl-P)
File-> Print Preview
File-> Print All Plots
File -> Export Graph
File -> Export
File -> Import
File -> Quit (Ctrl-Q)
The Edit Menu
Edit -> Undo (Ctrl-Z)
Edit -> Redo (Ctrl-Shift-Z)
Edit -> Cut Selection (Ctrl-X)
Edit -> Copy Selection (Ctrl-C)
Edit -> Paste Selection (Ctrl-V)
Edit -> Delete Selection (Del)
Edit -> Delete Fit Tables
Edit -> Clear Log Information
Edit -> Preferences...
The View Menu
View -> Toolbars... (Ctrl-Shift-T)
View -> Project Explorer (Ctrl-E)
View -> Results log
View -> Undo/Redo Stack...
View -> Show/Hide Scripting Console
The Scripting Menu
General Scripting Commands
Notes Specific Scripting Commands
The Graph Menu
Graph -> Add/Remove Curves... (Alt-C)
Graph -> Add Function... (Ctrl-Alt-F)
Graph -> Add Error Bars... (Ctrl-B)
Graph -> Rescale To Show All (Ctrl-Shift-R)
Graph -> Exchange X-Y Axes
Graph -> New Legend (Ctrl-L)
Graph -> Add Equation... (Alt-Q)
Graph -> Add Text (Alt-T)
Graph -> Draw Arrow (Ctrl-Alt-A)
Graph -> Draw Line (Ctrl-Alt-L)
Graph -> Add Rectangle (Ctrl-Alt-R)
Graph -> Add Ellipse (Ctrl-Alt-E)
Graph -> Add Time Stamp (Ctrl-Alt-T)
Graph -> Add Image (Alt-I)
Graph -> Add Central Axis
Z-Order Commands...
Graph -> Add Layer (Alt-L)
Graph -> Add Empty Inset Layer
Graph -> Add Inset Layer With Curves
Graph -> Arrange Layers (Shift-A)
Graph -> Automatic Layout command
Graph -> Extract to Graphs command
Graph -> Extract to Layers command
Graph -> Remove Layer (Alt-R)
The Plot Menu
Plot Wizard (Ctrl-Alt-W)
Line ->
Symbol ->
Line + Symbol ->
Column/Bar/Pie ->
Multi-Curve ->
Area ->
Special Line/Symbol ->
Statistical Graphs ->
Panel ->
Data -> Plot 3D ->
The 3D Plot menu
3D Wire Frame
3D Hidden Lines
3D Polygons
3D Wire Surface
Contour+Color Fill
Countour Lines
Gray Scale Map
The Data Menu
Data -> Disable tools
Data -> Zoom In/Out and Drag Canvas
Data -> Zoom/Drag Canvas Horizontally
Data -> Zoom/Drag Canvas Vertically
Data -> Zoom in (Ctrl-+)
Data -> Zoom out (Ctrl--)
Data -> Select Data Range (Alt-S)
Data -> Data Reader (Ctrl-D)
Data -> Annotation
Data -> Screen Reader
Data -> Draw Data Points
Data -> Move Data points (Ctrl-Alt-M)
Data -> Remove Bad Data Points (Alt-B)
Data -> Remove Bad Data Points
The Analysis Menu
Commands for the analysis of data in tables
Commands for the analysis of curves in plots
Commands for the analysis of data in matrices
The Table Menu
Set Column As
Column Options...
Set Column Values...
Fill column with
Add Column
Set Columns...
Hide Selected Columns
Show All Columns
Set Optimal Column Width
Move to First
Move Left
Move Right
Move to Last
Swap columns
Set Rows...
Delete Rows Interval...
Move Row
Go to Row... (Ctrl-Alt-G)
Go to Column... (Ctrl-Alt-C)
Extract Data...
Convert to Matrix
The Matrix Menu
Set Properties...
Set Dimensions... (Ctrl-D)
Set Values... (Ctrl-Q)
Recalculate (Ctrl-Return)
Rotate 90 (Ctrl-Shift-R)
Rotate -90 (Ctrl-Alt-R)
Flip V (Ctrl-Shift-V)
Flip H (Ctrl-Shift-H)
Go To Commands
View Commands
Show Column/Row (Ctrl-Shift-C)
Show X/Y (Ctrl-Shift-X)
Convert to Spreadsheet
The Format Menu
Apply Template...
Edit Range...
Plot Associations...
The Windows Menu
Next (F5)
Previous (F6)
Rename Window
Script Window (F3)
Window Geometry...
Hide Window
Close Window (Ctrl-W)
Numbered Window List
Customization of 3D plots
No axes
Front Grid
Back Grid
Left Grid
Right Grid
Ceiling Grid
Floor Grid
Enable perspective
Reset rotation
Fit frame to window
Bars Style
Cross Hairs
3D Wire Frame
3D Hidden Lines
3D Polygons
3D Wire Surface
Floor Data Projection
Floor Isolines
Empty Floor
4. The Toolbars
The Edit Toolbar
The File Toolbar
The Plot Toolbar
The Layers Toolbar
The Table Toolbar
The Column Toolbar
The Plot 3D Toolbar
5. The Dialogs
Add Custom Action
Add Error bars
Function Dialog
Add Layer
Add/Remove Curves
Arrange Layers
Line Options
Line Tab
Arrow Head Tab
Geometry Tab
Axes Tab
Column Options
Plot Associations
Edit Curve Range
Plot Details
Window Display
Layer Display
Group Edit
Curve axes
Error bars
Pie plots
Pie geometry
Pie labels
Histogram Data
Contour Lines
Define surface plot
Export Graph Dialog
Export ASCII Dialog
Fast Fourier Transform Dialog
FFT Filter Dialog
Find Peaks Dialog
Baseline Dialog
Integrate Function Dialog
The Fit Wizard
Select Function Tab
Fitting Session Tab
Custom Output Tab
General Plot Options
Scale Tab
Grid Tab
Axis Tab
Special Ticks Tab
General Tab
Plot Wizard
Project Explorer Find Dialog
Preferences Dialog
General Preferences
Tables Preferences
2D Plot Preferences
3D Plot Preferences
Notes Preferences
Fitting Preferences
Set Column Values
Extract Data
Set Matrix Dimensions
Import ASCII files
Matrix Properties
Set Matrix Values
Surface plot options
Scale Tab
Axis Tab
Grid Tab
Title Tab
Data Tab
Colors Tab
3D Vectors Tab
Legend Tab
General Tab
Print Tab
Sorting Options
Tex Equation Editor
Text options
6. Analysis of data and curves
Fast Fourier Transform
The Fit Wizard
Fitting to specific curves
Fitting to a line
Fitting to a polynomial
Fitting to a Boltzmann function
Fitting to a Gauss function
Fitting to a Lorentz function
Fitting to a PsdVoigt1 function
Fitting to a PsdVoigt2 function
Multi-Peaks fitting
Filtering of data curves
FFT low pass filter
FFT high pass filter
FFT band pass filter
FFT block band filter
7. Mathematical Expressions and Scripting
The Initialization File
Python Basics
Defining Functions and Control Flow
Mathematical Functions
Accessing QtiPlot's objects from Python
Project Folders
Working with Tables
Working with Matrices
Table/Matrix conversion
Stem Plots
2D Plots
3D Plots
Data Analysis
Working with Notes
Using PyQt's dialogs and classes
Using Qt Designer for easy creation of custom user dialogs
Task automation example
Scope Changes
QtiPlot/Python API
PyQt Class Reference
8. Frequently asked questions
List of Tables
4-1. Edit toolbar commands.
4-2. File toolbar commands.
4-3. New Window/Folder Commands
4-4. New Function/Surface Commands
4-5. Open Commands
4-6. Plot toolbar commands
4-7. Plot Toolbar Zoom Commands
4-8. Read Data Commands
4-9. Edit Data Commands
4-10. Add Text Commands
4-11. Add Line/Arrow Commands
4-12. Geometric Shape Commands
4-13. Z-order Commands
4-14. Align Objects Commands
4-15. Layers toolbar commands
4-16. Add Layer/Axes Commands
4-17. Table toolbar commands.
4-18. Line Plots
4-19. Scatter Plots
4-20. Line & Symbol Plots
4-21. Bar Chart Plots
4-22. Statistical Plots
4-23. Vector Plots
4-24. Special Line/Symbol Plots
4-25. 3D Plots
4-26. Column toolbar commands.
4-27. 3D Plot toolbar commands.
7-1. muParser: Predefined Fundamental Physical Constants in the standard MKSA unit system
7-2. muParser: Supported Mathematical Operators
7-3. muParser: Mathematical Functions
7-4. muParser: Other functions
7-5. Python: Supported Mathematical Functions
List of Figures
1-1. A typical QtiPlot session
1-2. The QtiPlot table
1-3. Working with Excel workbooks in QtiPlot
1-4. Context menu for Excel workbooks
1-5. Properties dialog for Excel workbooks
1-6. The QtiPlot matrix
1-7. An example of QtiPlot 2D graph
1-8. The QtiPlot Note Window
1-9. The QtiPlot Results Log window
1-10. The QtiPlot Project Explorer
1-11. Export QtiPlot windows/projects as Origin C files
1-12. OriginLab - Create new custom menu
1-13. OriginLab - New custom menu
1-14. OriginLab - New custom menu item
1-15. OriginLab - Import script
1-16. OriginLab - Select C file generated by QtiPlot
2-1. A simple 2D plot: the table.
2-2. A simple 2D plot: the default plot.
2-3. A simple 2D plot: the plot finished.
2-4. A 2D plot with two Y axes.
2-5. Direct plot of a function.
2-6. Function plot: filling of the X column.
2-7. Function plot: filling of the Y column.
2-8. Example of a 3D Plots.
2-9. Definition of a new surface 3D plot
2-10. The 3D surface plot created using defaults
2-11. The 3D surface plot after customization.
3-1. The Smooth -> Savitsky-Golay... dialog.
3-2. The Smooth -> Moving Window Average... dialog.
3-3. The Smooth -> Lowess... dialog.
3-4. The Smooth -> FFT Filter... dialog.
3-5. The FFT Filter -> Low Pass... dialog.
3-6. The FFT Filter -> High Pass... dialog.
3-7. The FFT Filter -> Band Pass... dialog.
3-8. The FFT Filter -> Band Block... dialog.
3-9. The Interpolate... dialog.
4-1. The QtiPlot Edit Toolbar
4-2. The QtiPlot File Toolbar
4-3. The QtiPlot Plot Toolbar
4-4. The QtiPlot Layers Toolbar
4-5. The QtiPlot Table Toolbar
4-6. The QtiPlot Column Toolbar
4-7. The QtiPlot Plot 3D Toolbar
5-1. The Add Custom Script Action... dialog box.
5-2. The Add Error Bars... dialog.
5-3. Example of a plot with both X and Y Error Bars.
5-4. The Add Function... dialog box: Cartesian Coordinates.
5-5. The Add Function... Dialog Box: Automatic Detection of Constants.
5-6. The Add Function... dialog box: Parametric Coordinates.
5-7. The Add Function... dialog box: Polar Coordinates.
5-8. The Add Layer Dialog Box.
5-9. The Add/Remove Curves... Dialog Box.
5-10. The Arrange Layers dialog: the Geometry Tab
5-11. Example of a vertical arrangement for two plots.
5-12. The Arrow Options Dialog: Line Tab
5-13. The Arrow Options Dialog: Arrow Head Tab
5-14. The Arrow Options Dialog: Geometry Tab
5-15. The Arrow Options Dialog: Axes Tab
5-16. The Column Options... Dialog.
5-17. The Plot Associations Dialog.
5-18. The Edit Curve Range Dialog.
5-19. The Plot Details Dialog: Dimensions tab.
5-20. The Plot Details Dialog: Print tab.
5-21. The Plot Details Dialog: Fonts tab.
5-22. The Plot Details Dialog: Miscellaneous tab.
5-23. The Plot Details Dialog: Display tab.
5-24. The Plot Details Dialog: Legends/Titles tab.
5-25. The Plot Details Dialog: Layer properties.
5-26. The Plot Details Dialog: Canvas with a solid background color.
5-27. The Plot Details Dialog: Canvas with a background image.
5-28. The Plot Details Dialog: Canvas geometry.
5-29. The Plot Details Dialog: Layer Speed Mode.
5-30. The Plot Details Dialog: Layer Display.
5-31. The Plot Details Dialog: Layer Display.
5-32. The Plot Details Dialog: Group Edit tab.
5-33. Context menu of a plot layer.
5-34. The Plot Details Dialog: Assign Axes.
5-35. The Plot Details Dialog: Line formatting.
5-36. The Plot Details Dialog: Standard Symbol formatting.
5-37. The Plot Details Dialog: Unicode Symbol formatting.
5-38. The Plot Details Dialog: Image Symbol formatting.
5-39. The Plot Details Dialog: Labels formatting.
5-40. The Plot Details Dialog: Offset formatting.
5-41. The Plot Details Dialog for formatting error bars.
5-42. The Plot Details Dialog for pies: Pie Segment Formatting.
5-43. The Plot Details Dialog for pies: Pie Geometry.
5-44. The Plot Details Dialog for pies: Pie Labels Formatting.
5-45. The Plot Details Dialog for box: Whiskers Formatting.
5-46. The Plot Details Dialog for box: Percentile Formatting.
5-47. The Plot Details Dialog for box: Data Formatting.
5-48. The Plot Details Dialog for histograms: Spacing Formatting.
5-49. The Plot Details Dialog for histograms: Data Formatting.
5-50. The Plot Details Dialog: Distribution Curve Line formatting.
5-51. The Plot Details Dialog for Vector XYXY curves.
5-52. The Plot Details Dialog for Vector XYAM curves.
5-53. The Values tab.
5-54. The Colors tab.
5-55. The Contour Lines tab.
5-56. The Labels tab.
5-57. The New -> New Function Plot -> New 3D Surface Plot... dialog box.
5-58. The New -> New Function Plot -> New 3D Surface Plot... dialog box.
5-59. Export of a selection from a table to an ASCII file.
5-60. The FFT... dialog box for a curve.
5-61. The FFT... dialog box for a table.
5-62. The FFT... dialog box for a matrix.
5-63. The FFT Filter -> Low Pass... dialog.
5-64. The FFT Filter -> High Pass... dialog.
5-65. The FFT Filter -> Band Pass... dialog.
5-66. The FFT Filter -> Band Block... dialog.
5-67. The FFT Filter Dialog dialog box for a matrix.
5-68. The Find Peaks dialog box.
5-69. The Baseline dialog.
5-70. The Integrate Function... dialog box.
5-71. The first step of the Fit Wizard... dialog box.
5-72. The second step of the Fit Wizard... dialog box.
5-73. The third step of the Fit Wizard... dialog box.
5-74. General plot options dialog: The Scale Tab.
5-75. General plot options dialog: The Grid Tab.
5-76. General plot options dialog: The Axis Tab.
5-77. General plot options dialog: The Special Ticks Tab.
5-78. General plot options dialog: General Settings.
5-79. The plot wizard dialog box.
5-80. The project explorer find dialog.
5-81. The preferences dialog: general parameters for the application.
5-82. The Preferences dialog: Confirmations tab.
5-83. The Preferences dialog: Colors tab.
5-84. The Preferences dialog: Numeric Format tab.
5-85. The preferences dialog: File Locations Tab.
5-86. The preferences dialog: Keyboard Tab.
5-87. The preferences dialog: Internet Connection Tab.
5-88. The Preferences dialog: table options.
5-89. The preferences dialog: 2D plot options.
5-90. The Preferences dialog: Curves Tab.
5-91. The Preferences dialog: Error Bars Tab.
5-92. The Preferences dialog: Axes Tab.
5-93. The Preferences dialog: Ticks Tab.
5-94. The Preferences dialog: Grid Tab.
5-95. The Preferences dialog: Geometry Tab.
5-96. The Preferences dialog: Speed Tab.
5-97. The Preferences dialog: Fonts Tab.
5-98. The Preferences dialog: Print Tab.
5-99. The preferences dialog: 3D plot options.
5-100. The preferences dialog: note options.
5-101. The preferences dialog: fitting options.
5-102. The Print dialog.
5-103. The Set Column Values... dialog.
5-104. The Extract Data... dialog.
5-105. The Set Dimensions... dialog for matrix.
5-106. The dialog box.
5-107. The Set Properties... dialog for matrices.
5-108. The Set Values... dialog for matrix.
5-109. The surface plot options dialog box.
5-110. The 3D Vector options tab.
5-111. The legend tab.
5-112. The general plot options tab.
5-113. The 3D plot print options.
5-114. The Sorting Options Dialog.
5-115. The Tex Equation Editor.
5-116. The Tex Equation Editor: compilation of complete LaTeX documents.
5-117. The axis title options dialog.
5-118. The legend/text options dialog.
6-1. An example of the FFT.
6-2. An example of a correlation between two sine functions.
6-3. The results of the Fit Wizard....
6-4. The results of a Fit Linear.
6-5. The results of a Fit Polynomial..., showing the initial data, the curve added to the plot, and the results in the log panel.
6-6. The results of a Fit Boltzmann (sigmoidal).
6-7. The results of a Fit Gaussian.
6-8. The results of a Fit Lorentzian.
6-9. The results of a Fit Multi-peak -> Gaussian....
6-10. Signal after a FFT low pass filter
6-11. Signal after a FFT high pass filter
6-12. Signal after a FFT band pass filter
6-13. Signal after a FFT block band filter
6-14. Comparison of the three methods of interpolation
List of Equations
6-1. Fourier equation
6-2. Covariance function of two signals x(t) and y(t)
6-3. Boltzmann equation
6-4. Logistic dose response equation
6-5. Gauss equation
6-6. Lorentz equation
6-7. PsdVoigt1 equation
6-8. PsdVoigt2 equation