The QtiPlot Handbook
Prev | Chapter 1. Introduction | Next

# General Concepts and Terms

Several plots and all the data related to these plots can be save in a project file, the project is therefore the main container of QtiPlot. The following screenshot gives an example of a typical session. This example shows the log panel at the top of the workspace, the project explorer at the bottom, a table and a plot window are shown while other are docked or hidden.

Figure 1-1. A typical QtiPlot session

There are numerous commands available in QtiPlot depending on the element which is selected. Therefore, the main menu bar changes when you select a particular element of the project. Moreover, you can access to the set of commands relevant of an element by activating the context menu with the right button of the mouse.

In a project, the containers which can be used are:

A Table

  A table is a spreadsheet which can be used to store the datas you are entering. It can also be used to do some calculations and statistical analysis of datas. In each table, columns can be labelled as X-values or Y-values for 2D-plotting, or Z-values if you plan to build a 3D-plot.

  A table can be created by the New -> New Table command. Then there are several ways to fill the table with your data. If you want to read a table from an ASCII file, you can import the data from the file to a table with the Import -> Import ASCII... command. You can also enter each value from the keyboard. The last way to enter your data is to fill the table with the results of a mathematical function (Set Column Values... command from the Table menu)

A Matrix

  A matrix is a special table which is used to store the data points for surface 3D plots. It contains Z-values and doesn't include any column or row which could be designed as X-values or Y-values. Nevertheless, you can specify the X-values and the Y-values with the Set Dimensions... command command from the Matrix menu.

  A matrix can be created by the New -> New Matrix command. If you want to read a matrix from an ASCII file, you can import the data of the file to a table with the Import -> Import ASCII... command and then convert this table to a matrix with the Convert to Matrix command. In the same way as for tables, you can also fill matrix with the results of a function z=(i,j) in which i and j are row and column numbers (Set Values... command from the Matrix menu)

A Graph

  A graph can contain one or several plots. Each of these plots is contained in a different layer, these layers can be arranged in many ways to build matrix of plots.

  A new layer can be added to an existing graph with the Add Layer command from the Graph menu. you can also remove an existing layer with the Remove Layer command, but if you remove a layer, the plot will be deleted. You can also copy a layer from one graph to another. You can also copy an existing graph into another, the window will be added as a new layer (see the section on Multilayer Plots for more details).

  Plots can be created in several ways. You can select data in tables or matrix and build a plot, or create new plots from functions of one or two variables (see sections 2D plots and 3D plots).

A Note

  This window is a text container which can simply be used to insert comments into a project, but is really far more powerfull than that. It can be used as a calculator, for executing single commands and for writing scripts.

The Log Window

  This window is used to store the results of all the calculations which have been done. If this window is not visible, you can find it with the Project Explorer or with the Results log command.

  The text in the log window is also saved in the project file, so that when you load a previously saved project, the results-log panel is re-filled with the results of the calculations.

The Project Explorer

  This window is used to list all the windows contained in a projet. The Project Explorer gives a quick access to all elements of a project, hidden or visibles. It can be used to do some operations on the windows related to these items such as hidding a window, renaming windows, etc.

  Since the version 0.8.5, a project file can include several independant projects. In this case, the containers of each project are stored in different folders.

## Tables

The table is the main part of QtiPlot when working with data. For controlling and converting data the spreadsheet contains a highly customizable table: all colors and font preferences can be set using the Preferences... command of the View menu. You can resize a table in terms of rows and columns using the Table menu with Rows command or Columns command.

Figure 1-2. The QtiPlot table

Every column of the table has a label and can be assigned a format: numeric, text, date or time. In a spreadsheet, columns can have the following flags: X, Y, Z, X-error, Y-error or can be simple columns without any special flag. The X columns are abscissae columns while the Y columns are ordinates columns used when creating a 2D plot from data. The X-error and Y-error columns can be used in order to add error bars to 2D plots. These flags can be changed using the Column options dialog. To reach this dialog you simply have to double-click on the column label or to use the Column Options... command of the Table menu.

You can select all the columns of the spreadsheet (Ctrl+A) or only some of them by clicking on the column label while keeping the Ctrl key pressed, or by moving the mouse over the column label. This also allows you to deselect columns.

On the selected columns you can perform various operations: fill with data, normalize, sort, view statistics and finally make plots out of your data. All these functions can be reached by right clicking on the column label or by using the Table menu.

Any other spreadsheet function: rename, duplicate, export, print, close can be reached via the context menu (right click anywhere in the table outside the column labels area).

You can cut, copy and paste data between spreadsheets or between a spreadsheet and another application (Excel, Gnumeric, etc...).

You can import single or multiple ASCII files using the Import -> Import ASCII... command from the File menu. Of course you can export the data from the spreadsheet to a text file using the Export ASCII command.

## Matrix

The matrix is a special table which is used for data depending on two variables. This special table can be used to create 3D plots as well as 2D image/contour plots via the Plot 3D menu and the 3D plot toolbar. The difference between a table and a matrix is that matrices have a dual functioning mode: they can display data in a table form or they can display an image. Therefore matrices can be used as a basic image viewer and also as an image editor, since they implement some image manipulation funcions like: 90 degrees rotation, horizontal and vertical mirroring, etc...

In matrices there is no special column nor special row for X or Y labels or values. Nevertheless, you can specify an X-scale and an Y-scale with the Set Dimensions... command.

Figure 1-3. The QtiPlot matrix

The values which are stored in a matrix can be obtained from a function of the form z=f(i, j, x, y) with the Set Values... command, i and j beeing the column and row numbers and x and y the corresponding coordinates. They can also be read directly from an ASCII file with the Import -> Import ASCII... command or from an image file.

## Plot Window

The plot window is the one in which the graphic is plotted. It contains at least one layer, which is the main container of the plot window. Each new plot can be inserted in a new layer of this plot window, it has its own geometry and graphic properties (background color, frame, etc). The example presented below shows a graph with two layers which have different geometries.

Figure 1-4. An example of QtiPlot 2D graph

Each layer can be activated by clicking on the corresponding gray button in the top-left corner of the window.

The elements which can be accessed by a double click in a layer are:

- the graph itself: this will open the Custom Curve Dialog. You can then add new curves to the plot, or change the way the curves are plotted.

- The axes or the axes labels: this will open the General Plot Options Dialog. It is used to customize the axes, the numbers and labels of the axes, and the grid.

- Text items, including the legend of the plot: this will open the Text Options Dialog which allows to customize the font of the label and the frame in which it is drawn.

- Arrow/Line items: this will open the Line Options Dialog.

- Image items: this will open a dialog allowing to customize the geometry and the position of the image.

A left click on a plot element selects it. You can deselect any element by presing the Escape key. A right click on a plot element pops-up a context menu allowing fast access to its properties dialog. Last but not least, you should know that QtiPlot provides multiple selection for objects in a plot layer. In order to add an object to an existing selection keep the Shift key pressed and click on the element you want to add to the selection. Elements in a multiple selection can be moved and resized together with the mouse.

## Note

A note can simply be used to insert text (comments, notes, etc) into a project, but is really far more powerfull than that. It can be used as a calculator, for executing single commands and for writing scripts. Evaluation of mathematical expressions and execution of code is done via a note's context menu, the Scripting menu or the convenient keyboard shortcuts. For information on expression syntax, supported mathematical functions and how to write scripts, see here.

Figure 1-5. The QtiPlot Note Window

Note windows provide powerful text editor functionalities, particularly helpful when writing scripts: customizable Python syntax highlighting, line numbers display, find and replace text, autocompletion suggestions for words that have more than two characters. You can trigger autocompletion using Ctrl+U. The colors used for syntax highlighting can be customized via the Notes tab in the Preferences dialog.

## Log Window

This window keeps a history of all analysis which have been done in the project. This panel contains the results of all the correlations, fittings, etc.

Figure 1-6. The QtiPlot Log window

## The Project Explorer

The project explorer can be opened/closed using the Project Explorer command from the View menu or by clicking on the in the file toolbar.

Figure 1-7. The QtiPlot Project Explorer

It gives an overview of the structure of a project and allows the user to perform various operations on the windows (tables and plots) in the workspace: hiding, minimazing, closing, renaming, printing, etc... These functions can be reached via the context menu, by right-clicking on an item in the explorer.

By double-clicking on an item, the corresponding window is shown maximized in the workspace, even if it was hidden before.

You can organize the differents objects in folders. When selecting a folder, the default policy is that only the objects contained in it will be showed in the workspace window. You can also display all the objects in the subfolders if you change this policy with the "View Windows" command to "Windows in Active Folder and Subfolders".

Prev | Home | Next
Command Line Parameters | Up | Drawing plots with QtiPlot