JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches
Collaboration diagram for Graphs:

Graph Class Structure

Each type of graph is represented by another class, which has to be derived from JKQTPPlotElement. This class provides a basic virtual interface that allows JKQTPlotter to draw the graphs represented by them. This interface consists of these functions:

In addition to these basic functions, there are additional functions that can be used to draw something outside the actual plot rectangle. These are used to e.g. add color-scales to the side of the graph:

Usually if writing a new graph, one would not directly derive from JKQTPPlotElement, but from a cass in it's hirarchy of children. These children already provide certain facilities for certain types of graphs.

Mix-In Classes for Graphs

See also
Mix-in classes for Graphs

In addition there are mix-in classes that are used via multiple inheritance that add additional features and properties to a graph. A prominent example are the classes for error indicators. With these there are usually two variants of one type of graph: One without error indicators and one with error indicators, e.g.:

This approach allows to keep interfaces and appearance recognizeable over different graph classes and locates the source code for a feature like error indicators in a single/in few class(es).

Another example of such a class is JKQTPColorPaletteStyleAndToolsMixin, which provides functions that allow to use color palettes. It is mainly used for the Image/Matrix graphs, but also by e.g. JKQTPXYParametrizedScatterGraph.