Using LabPlot

Interface Overview
LabPlot follows the MDI (Multiple Document Interface) philosophy - all the created application objects are placed as sub-windows in the Main Area of the application window. The Project Explorer serves as the tool to create and organize those objects in a tree-like structure. The Properties Explorer is used to modify the properties of the currently selected object(s). Many functions are reachable via the main menu and via object specific toolbars and context menus. Additional information and application notifications are shown in the status bar.
The default LabPlot window

Project Explorer
The Project Explorer is the main part of LabPlot aimed to handle its objects. Objects are organized in a tree-like structure representing the parent-child relations between the different objects. Folders and sub-folders can introduce additional grouping for the different objects.
Project explorer is a dockable window and can be placed at an arbitrary place. The user can determine which columns should be shown by selecting/deselecting the columns of interest in the context menu ( click on an empty place in the tree-view or its header). Furthermore, the list of shown objects can be reduced by providing a filter in the Search/Filter text field.

Main Area
Created objects having a view (like worksheet, spreadsheet ) are placed in the main area of the application. Depending on the current setting for the user interface, windows are placed either as independent and freely moveable sub-windows (interface "Sub-window view") or as tabs in a tabbed view (interface "Tabbed view").
When sub-windows are used, all windows of objects belonging to the currently selected folder only are shown. Alternatively, the visibility of windows can be extended to the currently selected folder and its sub-folders or to all windows in the project. This behaviour is controlled via the parameter "Window visibility policy" accessible via the context menu of the project explorer.

Properties Explorer
Properties explorer allows the user to modify the currently selected object in the project explorer. A great variety of object properties can be edited in undoable/redoable way. Editing of multiple objects of the same time is also possible.
Properties explorer is a dockable window and can be placed at an arbitrary place.

Spreadsheet
The spreadsheet is the main part of LabPlot when working with data and consists of columns. Column is the basic data set in LabPlot used for plotting and data analysis. Every column of the spreadsheet is specified by its name and the type - numeric, text, month names, day names and date and time. Also, for each type different representation formats can be assigned like decimal or scientific format for numeric columns
You can mask selected data points in the spreadsheet (Selection Mask Selection from the spreadsheet cell context menu). Masked data is not plotted and is also excluded from data analysis functions like fitting Alternatively, you can mask or drop values in a column (Mask Values or Drop Values from the column context menu) by specifying a range. When specifying which values to mask or to drop, several operators (“equal to”, “greater than”, “lesser than”, ) are available. These operations can help to hide or to remove some outliers in the data set prior to, ⪚, performing a fit to this data set.
Any spreadsheet function can be reached via the context menu ( click). You can cut, copy and paste between spreadsheets, generate, normalize and sort data and finally make plots out of your data.
New data can be produced either by entering it manually in the spreadsheet or by generating the data according to a certain prescription. LabPlot provides 5 different methods to generate data, accessible via the context menu of the column:
Row Numbers - values in the column are set according to its row number, this provide an easy way to quickly create an index.
Const Values - values in the column are set to a constant value provided by the user.
Equidistant values (for numeric columns only) - given the minimal and the maximal values, the equidistant values can be either generated by fixing the total number of values in that range or by fixing the increment (distance).
Random values (for numeric columns only) - values are randomly generated according to the selected distribution. To generate uniformly distributed random numbers, select "Flat" distribution.
In the simplest cases a non-uniform distribution is calculated analytically from the uniform distribution of a random number generator by applying an appropriate transformation. More complicated distributions are created by the acceptance-rejection method, which compares the desired distribution against a distribution which is similar and known analytically.
Function values (for numeric columns only) - values are generated according to a mathematical function provided by the user, a column (data set) containing the function arguments has to be provided. It is possible to define a multivariant function and to provide a data set (a column in a spreadsheet) for each of the variables. The corresponding dialog supports the creation of arbitrary number of variables.
Already existing data can be imported into a spreadsheet from external files via the "Import Data" dialog. Imported data will be stored in the project file. Changes on data, performed either in the spreadsheet or in the external file after the import, are not synchronized anymore.
The data in the spreadsheet can be exported to an external file (see Export Dialog).

Matrix
Matrix is another container for matrix-like data. This container is presented like a table or, alternatively, as a two-dimensional greyscale image. The elements of such a table/matrix can be thought as being the Z-values, Z=Z(X,Y), with X and Y values being the row and column numbers, respectively. The transition from the row and column numbers to the logical coordinates is done via an explicit user-defined mapping of both representations.
The matrix data can either be entered manually or via an import from an external file. Similar to the data generation for a column in a spreadsheet, the matrix can be filled with constant values or via a formula, too. The screenshot below shows the image view of a matrix together with the formula that was used to generate the matrix elements:

Workbook
Workbook helps the user to better organize and to group different data containers (Spreadsheet and Matrix). This object serves as the parent container for multiple Spreadsheet- and/or Matrix-objects and puts them together in a view with multiple tabs:
With folders it is already possible to bring some structure in the Project Explorer and to group together several related objects (spreadsheets with data stemming from text files of similar origin, red, green and blue values of an image imported into three different matrices, ). With Workbook the user has the possibility for another additional grouping.

Worksheet
The worksheet is, besides the data containers Spreadsheet and Matrix, another central part of the application and provides an area for showing and grouping together different kinds of worksheet objects - plots, labels
Worksheets can either have a fixed size (a user defined size or one of the predefined sizes like A4, Letter ) or they can fill out the complete available area for the worksheet window. Multiple plots can be arranged on the worksheet in a vertical, horizontal or grid layouts.
Many properties of the worksheet like size, background colour and layout settings can be changed in the "Worksheet properties" pane.
Different worksheet actions dealing with the creation of new objects, changing of the current mouse mode or zooming can be accessed via the toolbar, main menu or the context menu of the worksheet in the project explorer.
The results shown on the worksheet can be exported to different formats via the export dialog.

CAS Worksheet
The CAS worksheet is, besides the worksheet, the third central part of the application and provides an area to you use your favorite mathematical applications from within an elegant Worksheet Interface.
LabPlot offers you several choices for the backends you wish to use with it. The choice to make depends on what you want to achieve.
Currently the following backends are available:
Sage: 	 Sage is a free open-source mathematics software system licensed under the GPL. It combines the power of many existing open-source packages, within a common Python-based interface. See http://sagemath.org for more information.
Maxima: 	 Maxima is a system for the manipulation of symbolic and numeric expressions, including differentiation, integration, Taylor series, Laplace transforms, ordinary differential equations, systems of linear equations, polynomials, sets, lists, vectors, matrices, and tensors. Maxima yields high-precision numeric results by using exact fractions, arbitrary precision integers, and variable precision floating point numbers. Maxima can plot functions and data in two and three dimensions. See http://maxima.sourceforge.net for more information.
R: 	 R is a language and environment for statistical computing and graphics, similar to the S language and environment. It provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, ...) and graphical techniques, and is highly extensible. The S language is often the vehicle of choice for research in statistical methodology, and R provides an open-source route to this. See http://www.r-project.org for more information.
: 	 is a MathML-based graph calculator, that ships with Education project. See http://edu.kde.org/kalgebra/ for more information.
Qalculate!: 	 Qalculate! is not your regular software replication of the cheapest available calculator. Qalculate! aims to make full use of the superior interface, power and flexibility of modern computers. The center of attention in Qalculate! is the expression entry. Instead of entering each number in a mathematical expression separately, you can directly write the whole expression and later modify it. The interpretation of expressions is flexible and fault tolerant, and if you nevertheless do something wrong, Qalculate! will tell you so. Not fully solvable expressions are however not errors. Qalculate! will simplify as far as it can and answer with an expression. In addition to numbers and arithmetic operators, an expression may contain any combination of variables, units, and functions. See http://qalculate.sourceforge.net/ for more information.
Python2: 	 Python is a remarkably powerful dynamic programming language that is used in a wide variety of application domains. There are several Python packages to scientific programming.
Python is distributed under Python Software Foundation license (GPL compatible). See the official website for more information.
This backend adds an additional item to the 's main menu, Package. The only item of this menu is Package Import Package. This item can be used to import Python packages to the worksheet.
This backend supports Python 2 only.
Scilab: 	 Scilab is an free software, cross-platform numerical computational package and a high-level, numerically oriented programming language.
Scilab is distributed under CeCILL license (GPL compatible). See http://www.scilab.org/ for more information.
You need Scilab version 5.5 or higher to be installed in your system to make this backend usable.
Octave: 	 Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command line interface for solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with MATLAB. See http://www.gnu.org/software/octave/ for more information.
Lua: 	 Lua is a fast and lightweight scripting language, with a simple procedural syntax. There are several libraries in Lua aimed at math and science.
See http://www.lua.org/ for more information.
This backend supports luajit 2.

File Data Source
A file data source is very similar in spirit to a spreadsheet with imported data from an external file. The difference is that the imported data cannot be shown and edited in LabPlot after the import anymore. This can be sufficient ⪚ if you only want to plot the data stemming from a calculation in an external program (and exported to an ASCII-file afterwards).
Since no spreadsheet has to be filled with the imported data, the import into a file data source is faster than into a spreadsheet which can be advantageously when dealing with big files.
It is possible to store the link to the external file in the project file only and not its content. Each time the project file is opened in LabPlot, the content is read from the external file again. Also, it is possible to let LabPlot watch the file for changes - the content of the file data source is updated if the external file was changed.
The additional options determining the import of the data are equivalent to those provided in Import Dialog.

Datapicker
Datapicker is a tool that allows you to easily extract data from image files. The process of extraction consists mainly out of the following steps:
Import an image containing plots and curves where you want to read the data points from.
Select the plot type (cartesian, polar, ).
Select tree reference points and provide values for them. With the help of these points the logical coordinate system is determined.
Create a new datapicker curve and set the type of the error bars.
Switch to the mouse mode "Set Curve Points" and start selecting points on the imported image - the coordinates for the selected points are determined and added to the spreadsheet "Data".
It is possible to add more then one datapicker curve. This is useful in case the imported image contains several curves that need to be digitized. The datapicker curve that is currently being selected in the Project Explorer is the "active" one - points clicked on the datapicker image will be calculated and added to its data spreadsheet.
Calculated values are stored in different columns in data spreadsheets in the datapicker. These columns behave exactly the same like other columns in usual spreadsheets and can be directly used as source columns for curves in your own plots.
Datapicker supports the process of the data extraction with several helpers. To place the points more precisely, a magnification glass with different magnification levels is available. Also, the last selected point can be shifted with the help of the navigation keys. Furthermore, when reading data points having error bars, datapicker automatically creates bars indicating the end points of the error bars. Those bars can be pulled with the mouse until the required length (the distance to the data point) is reached.
The procedure for the extraction of data from an imported plot as described above is feasible when dealing with a limited number of points. In case the curves in the imported image are given as solid lines, the datapicker tool in LabPlot allows to read them (semi-)automatically. For this, after a new datapicker curve was added as described above, switch to the mouse mode "Select Curve Segments". The curves on the plot are recognized and highlighted. By clicking on a highlighted curve (or one of its segments), points along this curve are created. The length of a segment and the density of created points (separation between two points) are adjustable parameters. On the screenshots below, after switching to the segment mode all black lines were highlighted (green colour). In this specific case, the curve was recognized as a single segment and a single mouse-click on this segment is sufficient to digitize this curve and to automatically place points along the curve.
In many cases the plot is not as simple as above (single black curve on white background) and contains grid lines, many curves of different colour and thinness and a non-white background. In such a case the automatic detection fails (too many or no objects are highlighted). To help the datapicker to determine the curve(s) correctly, the user has to limit the allowed ranges in the HSV (or HSI) colour spaces. To subtract the non-white background it is possible to limit the range for the foreground colour, too. Internally, each pixel of the image is converted to black and white where only the points fitting into the user-defined ranges for hue, saturation, value, intensity and foreground are set to black.
On the screenshots below, the blue curves in the original image were projected onto by having appropriately reduced the allowed ranges in the colour space (note the peak for blue in the histogram for the hue). The transformed black and white image contains only the curves the user is interested in and it is now an easy task for the datapicker to determine the curves and to place points on them.
Similar to Worksheet, the currently visible area in the datapicker can be exported. The supported image formats as described in the section Export Dialog.

Import Dialog
In the import dialog you can import data into one of the available spreadsheets or matrices in LabPlot. The supported data formats are
ASCII
Binary
Image
NetCDF
HDF5
FITS
Preview of all supported file types is available in the import dialog. For data formats with complex internal structures (like NetCDF, HDF5 and FITS), the content of the file is presented in a tree view that allows comfortable navigation through the file. A versatile dialog to edit the headers (keywords) of a FITS file is also provided.
Import of ascii and binary data compressed with gzip, bzip2 or xz can be done directly as the decompression happens transparently for the user.
The name of the file containing the data to import has to be provided. The File Info button opens a dialog where some information about the selected file is shown. The type of the data can be specified - currently, only ASCII files containing several data sets (vectors) stored as columns are supported. The filter - automatic or custom - determines how the file has to be parsed. Selecting the filter "custom", several parameters like separating character can be provided manually in this case.
The start and end row to read can be customized using the Data portion to read tab. To read all data specify -1 as an end row or column.
Importing data into LabPlot
Importing data into LabPlot

Export Dialog
A worksheet can be exported to several graphics format (vector and raster). The export is done via the export dialog reachable via the Export in the main toolbar or File Export in the main menu.
Besides the graphics format, the user can specify which part of the worksheet has to be exported and whether the background has to be exported or not. Also, for raster graphics the image resolution can be provided.
The content of a spreadsheet can be exported to an external text or FITS file. In the export dialog for spreadsheets the user can specify the character separating values of different columns. Optionally, the header of the spreadsheet (names of the columns in the spreadsheet) can be exported.