SampLin's graph widget can be used as a component of dialog window or as a standalone application SampLinGraph to visualize/modify/import/export/print measured data as 2D graphs. Graph files have extension .sg and contain measured data as well as all property settings and annotations. Linking with NetCDF files is planned in future. Graph files are stored by default in directory $HOME/SampLin/Data. Graph window consists of graph panel and a property box which can be opened by pressing the push button on the right margin. Property box contains objects for which properties can be set - axes, graph, data series. To set properties, double-left-click object name. Various operations can be perfomed by right-clicking an object which opens a popup menu. The same effect has clicking on the object in graph panel - left clicking selects the object (active object displayed in status bar in case of SampLinGraph application), double-left-clicking open property dialog, right-clicking opens popup menu.
Almost all fetures are rather intuitive, so only more complicated will be described bellow:
After left-clicking in plot area and waiting ~1sec, a window appeares with current x and y coordinate. After left-clicking, draging and waiting ~1sec in plot area, the same window appeares but also with endpoint, distance and dy/dx
There are 4 axes available - left y, right y, top x, and bottom x, use series properties to assingn axes for a curve. Default is left y/ bottom x. In case of stacked series (graph properties, stack series checkbox On) series are displayed in a 3D like way, x offset and y offset between series are given in % of display with/height. This is useful e.g. for series of spectra. Only bottom x/ left y axes can be used in this mode
It's possible to plot curves with SampLinGraph. Just use 'New' to create new series. Set curve style to 'Fit' in series properties, select fitting tab and write the function to be plot into Function edit box, e.g. y(x)=10*sin(x) and set Plot range bellow. Function parser implents following funtions and operators: sqrt,sqr,exp,ln,log,sin,cos,tan,sinh,cosh,tanh,arcsin,arccos,arctan, arcsinh,arccosh, arctanh, abs,sgn, +, -, /, *, ^ and parenthesis ( ). It's also possible to fit function against series data. Define function like y(x,a,b,c=2)=a+b*exp(c*x), a,b,c are parameters to be fitted, parameter c will be initialized to value 2 at startup. Press Fit button to start fitting. Nonlinear Marquardt-Levenberg algoritm is used for fitting.
ASCII tables with two columns (X and Y) of data can be imported as series using the Import function. All lines containing other information than two values will be ignored.