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
|
This project (see ./examples/impulsesplot/
) simply creates a JKQTPlotter widget (as a new window) and adds a single impulse graph. The source code of the main application is (see impulsesplot.cpp
.
First data for a curve is calculated and stored in QVector<double>
:
... and finally the data is copied into the datastore
Now an impulse graph object is generated and added to the plot:
The result looks like this:
There is an alternative class JKQTPImpulsesHorizontalGraph
which draws horizontal impulse plots:
This code snippet results in a plot like this:
The classes JKQTPImpulsesVerticalGraph
and JKQTPImpulsesHorizontalGraph
also provide the ability to draw a symbol at the end of the impulse, e.g. using this code:
This code snippet results in a plot like this:
Finally you can move the baseline (i.e. the level, where the impulses start, which is typically x=0 or y=0) in the classes JKQTPImpulsesVerticalGraph
and JKQTPImpulsesHorizontalGraph
:
This code snippet results in a plot like this: