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 vertical bar plot for JKQTFastPlotter More...
#include <jkqtfastplotter.h>
Public Member Functions | |
JKQTFPVBarPlot (JKQTFastPlotter *parent, int N, double *x, double *y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1) | |
class constructor | |
JKQTFPVBarPlot (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 | |
Public Member Functions inherited from JKQTFPLinePlot | |
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 | |
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 | |
Additional Inherited Members | |
Public Types inherited from JKQTFPLinePlot | |
enum | DataType { JKQTFPLPPointer , JKQTFPLPVector } |
used to store which datatype is used for the plot data More... | |
Public Slots inherited from JKQTFPPlot | |
void | setVisible (bool visible) |
Protected Attributes inherited from JKQTFPLinePlot | |
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 | |
a simple vertical bar plot for JKQTFastPlotter
This class does not support y errors!
JKQTFPVBarPlot::JKQTFPVBarPlot | ( | 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) |
JKQTFPVBarPlot::JKQTFPVBarPlot | ( | 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 |
draw the graph
Reimplemented from JKQTFPLinePlot.