From GeopsyWiki
Jump to navigation Jump to search

All softwares use the same graphical engine for plotting their results (SciFigs library).

Basic concepts

  • figue: SciFigs front-end. Edition of figures extracted from processing applications.
  • Graphic sheet: a sheet where various objects can be arrange in a WYSIWYG way (What You See is What You Get)
  • Graphic object: common properties of all graphical objects that can be included in a graphic sheet
    Graphic objects can be of various types:
    • Graph: a 2D plot with an horizontal and a vertical axis. The graph content is made of a stack of layers.
    • Palette: map values to a color scale
    • Legend: a simple legend (pen, symbols,...)
    • Text: displays a simple text box
    • Image: displays images read from a file
  • Properties: how to edit attributes of objects
  • Make-up: how to save and restore easily object attributes


One could ask: why another graphical library for plotting XY data? The explanation goes back to the very first developments of a new dispersion curve inversion algorithm in 2002 (SESAME European Project). Based on a direct search algorithm, this code was generating a lot of distinct realizations (i.e. Vs profiles). Debugging and improvements of the forward computation of dispersion curves and the inversion algorithm required plotting thousands of curves on the same plot for first manual quality control. At that time, no high-level interface was able to achieve this task in a reasonable time. Hence, a low level graphical engine was built over Qt libraries with fast and light plotting in mind.

Little by little, the graphical engine evolved with the introduction of the layering concept. Several layers of distinct nature (points, lines, grids,...) can be overlaid on the same plot for comparison purposes. Less optimized but more flexible layers were progressively added (e.g. lines with customizable pen, style and symbols, grids, circles,...). Graphic sheets were also added for displaying several plots on the same screen. Originally with fixed geometry, it was used for plotting 2D projections of models in a N-dimension parameter space. Moving and resizing of plots was progressively introduced.

The last major improvement concerned the parallelization of the painting engine. Plots that need several seconds to be drawn do not freeze the graphical interface anymore. As a consequence, direct rendering of object modifications became efficient. A new centralized property editor was introduced at the same time.


SciFigs engine is still lacking some basic object manipulation like object grouping. Internally SciFigs' object are based on QWidget (like buttons, windows,...). Qt libraries offers now a much better interface for such graphics (The Graphics View Framework). Grouping and other advanced selection features will be directly available through this framework.