Next Previous Table of Contents
When starting kpl from the command prompt, you can supply the names of one or more plot or data files (either local filenames or URLs):
kpl [filenames ...]
In case of activated setting Autoplot, the graphical presentation is displayed immediately.
When in addition Autofit is activated, in case of a data file also a parameter fit to a function is automatically performed and the function is displayed, too.
kpl can be started to display a plot file by clicking its symbol in a KFM window or by selecting this action from its context menu.
kpl supports the Drag and Drop protocols of KDE and Qt . This means that you can open one or more plot or data files by dragging their symbols onto the kpl window. Data files will be recognized by the extension .dat, plot files by the extension .plo. In addition to local files also URLs may be passed in this way.
kpl supports the following shortcuts:
Ctrl + N Open a new plot file. Ctrl + O Open an existing plot file. Ctrl + S Save the current plot file. Ctrl + W Close the current plot file. Ctrl + P Print the graphical presentation. Ctrl + Q Quit kpl. F5 Reload the current file and refresh the plot. F1 Display the kpl help pages. Left Scroll left. Right Scroll right. Down Scroll down. Up Scroll Up. Page Up Scroll page up. Page Down Scroll page down. Ctrl + Page Up Scroll page left. Ctrl + Page Down Scroll page right. Home Scroll to bottom margin. End Scroll to top margin. Ctrl + Home Scroll to left margin. Ctrl + End Scroll to right margin.
The shortcuts for the Reload action and the various Scroll actions may be changed in the dialog Configure Key Bindings displayed using the Options menu. All other shortcuts are standard keys for all KDE applications and may be changed in the KDE Control Center.
Open a new plot file.
Open an existing plot file.
Open an existing data file.
Save the current plot file.
Print the graphical presentation.
Increase magnification.
Decrease magnification.
Reload the current file and refresh the plot.
Display the kpl help pages.
The horizontal and vertical positions of the mouse pointer are displayed in cm on the right side of the status bar at the bottom of the kpl window, for positions inside the data frame in data units, too. On the left side the short help for the different actions appears.
User defined C or C++ functions for graphical presentation of ordinary and parametric functions and for parameter fits are used by kpl as shared libraries. These functions return double values and expect a double function argument and a pointer to a double array of up to 20 parameters:
double myfunc(double x, double *p);
Module definition files (of the type .def and the same name as source and library files) are used as a lookup table by kpl. They correspond to the output of the program nm.
In the directory $KDEDIR/share/apps/kpl a shared library fkt.so as well as the source file fkt.c, the module definition file fkt.def, and a make file Makefile.fkt are already installed. The files fkt.c and Makefile.fkt may be used as examples and have to be customized in this case.
As an example for multidimensional parameter fits, a C++ source file fcompl.cpp as well as the corresponding files fcompl.so, fcompl.def, and Makefile.fcompl are provided in the same directory. Here two double valued functions make use of the real and imaginary part of a complex function, implemented with the class complex.
Next Previous Table of Contents