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
|
a simple line plot for JKQTFastPlotter More...
#include <jkqtfastplotter.h>
Public Types | |
enum | DataType { JKQTFPLPPointer , JKQTFPLPVector } |
used to store which datatype is used for the plot data More... | |
Public Member Functions | |
JKQTFPLinePlot (JKQTFastPlotter *parent, int N, double *x, double *y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1) | |
class constructor | |
JKQTFPLinePlot (JKQTFastPlotter *parent, QVector< double > *x, QVector< double > *y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1) | |
class constructor | |
virtual void | drawGraph (QPainter &painter) override |
draw the graph | |
QColor | getColor () const |
color of the graph | |
DataType | getDatatype () const |
which type of data is used for plotting ? | |
QColor | getErrorLineColor () const |
color of the graph | |
Qt::PenStyle | getErrorLineStyle () const |
style of the graph | |
double | getErrorLineWidth () const |
width of the graph (in pt) | |
int | getN () |
Qt::PenStyle | getStyle () const |
style of the graph | |
double | getWidth () const |
width of the graph (in pt) | |
double * | getX () const |
pointer to x-coordinate data to display | |
QVector< double > * | getXv () const |
pointer to x-coordinate data to display | |
double * | getY () const |
pointer to y-coordinate data to display | |
double * | getYerr () const |
pointer to yerr-coordinate data to display | |
QVector< double > * | getYerrv () const |
pointer to yerr-coordinate data to display | |
QVector< double > * | getYv () const |
pointer to y-coordinate data to display | |
void | setColor (const QColor &__value) |
color of the graph | |
void | setData (double *x, double *y, double *yerr, int N) |
void | setData (double *x, double *y, int N) |
void | setData (QVector< double > *x, QVector< double > *y) |
void | setData (QVector< double > *x, QVector< double > *y, QVector< double > *yerr) |
void | setErrorLineColor (const QColor &__value) |
color of the graph | |
void | setErrorLineStyle (Qt::PenStyle __value) |
style of the graph | |
void | setErrorLineWidth (double __value) |
width of the graph (in pt) | |
void | setStyle (Qt::PenStyle __value) |
style of the graph | |
void | setWidth (double __value) |
width of the graph (in pt) | |
Public Member Functions inherited from JKQTFPPlot | |
JKQTFPPlot (JKQTFastPlotter *parent) | |
class constructor | |
virtual | ~JKQTFPPlot () |
virtual class destructor | |
bool | isVisible () const |
returns whether this graph is visible inside the plot | |
void | paint (QPainter &painter) |
draw the graph | |
void | replot () |
start a replot of the parent widget | |
void | setParent (JKQTFastPlotter *parent) |
set the parent of the plot | |
Protected Attributes | |
QColor | color |
color of the graph | |
DataType | datatype |
which type of data is used for plotting ? | |
QColor | errorColor |
color of the graph | |
Qt::PenStyle | errorStyle |
style of the graph | |
double | errorWidth |
width of the graph (in pt) | |
int | N |
number of datapoints in the plot | |
Qt::PenStyle | style |
style of the graph | |
double | width |
width of the graph (in pt) | |
double * | x |
pointer to x-coordinate data to display | |
QVector< double > * | xv |
pointer to x-coordinate data to display | |
double * | y |
pointer to y-coordinate data to display | |
double * | yerr |
pointer to yerr-coordinate data to display | |
QVector< double > * | yerrv |
pointer to yerr-coordinate data to display | |
QVector< double > * | yv |
pointer to y-coordinate data to display | |
Protected Attributes inherited from JKQTFPPlot | |
JKQTFastPlotter * | parent |
parent class, i.e. the plotter to plot on | |
bool | visible |
indicates whether the plot is visible or not | |
Additional Inherited Members | |
Public Slots inherited from JKQTFPPlot | |
void | setVisible (bool visible) |
a simple line plot for JKQTFastPlotter
This class plots data as (x,y) points connected by straight lines. If errors for the y values are provided, also y+/-yerr errorlines are drawn.
JKQTFPLinePlot::JKQTFPLinePlot | ( | JKQTFastPlotter * | parent, |
int | N, | ||
double * | x, | ||
double * | y, | ||
QColor | color = QColor("red") , |
||
Qt::PenStyle | style = Qt::SolidLine , |
||
double | width = 1 |
||
) |
class constructor
parent | parent widget |
N | number of datapoints in the plot |
x | points to the x values in the plot |
y | points to the y values in the plot |
color | color of the plot |
style | style of the graph |
width | width of the plot (in pt) |
JKQTFPLinePlot::JKQTFPLinePlot | ( | JKQTFastPlotter * | parent, |
QVector< double > * | x, | ||
QVector< double > * | y, | ||
QColor | color = QColor("red") , |
||
Qt::PenStyle | style = Qt::SolidLine , |
||
double | width = 1 |
||
) |
class constructor
parent | parent widget |
x | points to the x values in the plot |
y | points to the y values in the plot |
color | color of the plot |
style | style of the graph |
width | width of the plot (in pt) |
|
overridevirtual |
|
inline |
color of the graph
|
inline |
which type of data is used for plotting ?
|
inline |
color of the graph
|
inline |
style of the graph
|
inline |
width of the graph (in pt)
|
inline |
|
inline |
style of the graph
|
inline |
width of the graph (in pt)
|
inline |
pointer to x-coordinate data to display
|
inline |
pointer to x-coordinate data to display
|
inline |
pointer to y-coordinate data to display
|
inline |
pointer to yerr-coordinate data to display
|
inline |
pointer to yerr-coordinate data to display
|
inline |
pointer to y-coordinate data to display
|
inline |
color of the graph
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
color of the graph
|
inline |
style of the graph
|
inline |
width of the graph (in pt)
|
inline |
style of the graph
|
inline |
width of the graph (in pt)
|
protected |
color of the graph
|
protected |
which type of data is used for plotting ?
|
protected |
color of the graph
|
protected |
style of the graph
|
protected |
width of the graph (in pt)
|
protected |
number of datapoints in the plot
|
protected |
style of the graph
|
protected |
width of the graph (in pt)
|
protected |
pointer to x-coordinate data to display
|
protected |
pointer to x-coordinate data to display
|
protected |
pointer to y-coordinate data to display
|
protected |
pointer to yerr-coordinate data to display
|
protected |
pointer to yerr-coordinate data to display
|
protected |
pointer to y-coordinate data to display