|
rock_widget_collection
0.1
|
A plottable representing a single statistical box in a plot. More...
#include <qcustomplot.h>
Inherits QCPAbstractPlottable.
Public Slots | |
| double | key () const |
| double | minimum () const |
| double | lowerQuartile () const |
| double | median () const |
| double | upperQuartile () const |
| double | maximum () const |
| QVector< double > | outliers () const |
| double | width () const |
| double | whiskerWidth () const |
| QPen | whiskerPen () const |
| QPen | whiskerBarPen () const |
| QPen | medianPen () const |
| double | outlierSize () const |
| QPen | outlierPen () const |
| QBrush | outlierBrush () const |
| void | setKey (double key) |
| void | setMinimum (double value) |
| void | setLowerQuartile (double value) |
| void | setMedian (double value) |
| void | setUpperQuartile (double value) |
| void | setMaximum (double value) |
| void | setOutliers (const QVector< double > &values) |
| void | setData (double key, double minimum, double lowerQuartile, double median, double upperQuartile, double maximum) |
| void | setWidth (double width) |
| void | setWhiskerWidth (double width) |
| void | setWhiskerPen (const QPen &pen) |
| void | setWhiskerBarPen (const QPen &pen) |
| void | setMedianPen (const QPen &pen) |
| void | setOutlierSize (double pixels) |
| void | setOutlierPen (const QPen &pen) |
| void | setOutlierBrush (const QBrush &brush) |
| virtual void | clearData () |
Public Slots inherited from QCPAbstractPlottable | |
| QCustomPlot * | parentPlot () const |
| QString | name () const |
| bool | visible () const |
| QPen | pen () const |
| QBrush | brush () const |
| QCPAxis * | keyAxis () const |
| QCPAxis * | valueAxis () const |
| void | setName (const QString &name) |
| void | setVisible (bool visible) |
| void | setPen (const QPen &pen) |
| void | setBrush (const QBrush &brush) |
| void | setKeyAxis (QCPAxis *axis) |
| void | setValueAxis (QCPAxis *axis) |
| void | rescaleAxes (bool onlyEnlarge=false) const |
| void | rescaleKeyAxis (bool onlyEnlarge=false) const |
| void | rescaleValueAxis (bool onlyEnlarge=false) const |
| virtual void | clearData ()=0 |
| virtual bool | addToLegend () const |
| virtual bool | removeFromLegend () const |
Public Member Functions | |
| QCPStatisticalBox (QCPAxis *keyAxis, QCPAxis *valueAxis) | |
| virtual | ~QCPStatisticalBox () |
Public Member Functions inherited from QCPAbstractPlottable | |
| QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis) | |
| virtual | ~QCPAbstractPlottable () |
Protected Member Functions | |
| virtual void | draw (QPainter *painter) const |
| virtual void | drawLegendIcon (QPainter *painter, const QRect &rect) const |
| virtual void | drawQuartileBox (QPainter *painter) const |
| virtual void | drawMedian (QPainter *painter) const |
| virtual void | drawWhiskers (QPainter *painter) const |
| virtual void | drawOutliers (QPainter *painter) const |
| virtual QCPRange | getKeyRange (bool &validRange, SignDomain inSignDomain=SDBoth) const |
| virtual QCPRange | getValueRange (bool &validRange, SignDomain inSignDomain=SDBoth) const |
Protected Member Functions inherited from QCPAbstractPlottable | |
| void | coordsToPixels (double key, double value, double &x, double &y) const |
| const QPointF | coordsToPixels (double key, double value) const |
Protected Attributes | |
| QVector< double > | mOutliers |
| double | mKey |
| double | mMinimum |
| double | mLowerQuartile |
| double | mMedian |
| double | mUpperQuartile |
| double | mMaximum |
| double | mWidth |
| double | mWhiskerWidth |
| double | mOutlierSize |
| QPen | mWhiskerPen |
| QPen | mWhiskerBarPen |
| QPen | mOutlierPen |
| QPen | mMedianPen |
| QBrush | mOutlierBrush |
Protected Attributes inherited from QCPAbstractPlottable | |
| QCustomPlot * | mParentPlot |
| QString | mName |
| bool | mVisible |
| QPen | mPen |
| QBrush | mBrush |
| QCPAxis * | mKeyAxis |
| QCPAxis * | mValueAxis |
Friends | |
| class | QCustomPlot |
| class | QCPLegend |
Additional Inherited Members | |
Protected Types inherited from QCPAbstractPlottable | |
| enum | SignDomain { SDNegative, SDBoth, SDPositive } |
A plottable representing a single statistical box in a plot.
To plot data, assign it with the individual parameter functions or use setData to set all parameters at once. The individual funcions are:
Additionally you can define a list of outliers, drawn as circle datapoints:
The appearance of the box itself is controlled via setPen and setBrush. You may change the width of the box with setWidth in plot coordinates (not pixels).
Analog functions exist for the minimum/maximum-whiskers: setWhiskerPen, setWhiskerBarPen, setWhiskerWidth. The whisker width is the width of the bar at the top (maximum) or bottom (minimum).
The median indicator line has its own pen, setMedianPen.
If the pens are changed, especially the median and whisker pen, make sure to set the capStyle to Qt::FlatCap. Else, e.g. the median line might exceed the quartile box by a few pixels due to the pen cap being not perfectly flat.
The Outlier data points are drawn as circles. Their look can be controlled with setOutlierPen and setOutlierBrush. The size (diameter) can be set with setOutlierSize in pixels.
Like all data representing objects in QCustomPlot, the QCPStatisticalBox is a plottable (QCPAbstractPlottable). So the plottable-interface of QCustomPlot applies (QCustomPlot::plottable, QCustomPlot::addPlottable, QCustomPlot::removePlottable, etc.)
Usually, you first create an instance:
add it to the customPlot with QCustomPlot::addPlottable:
and then modify the properties of the newly created plottable, e.g.:
Definition at line 422 of file qcustomplot.h.
Constructs a statistical box which uses keyAxis as its key axis ("x") and valueAxis as its value axis ("y"). keyAxis and valueAxis must both reside in the same QCustomPlot.
The constructed statistical box can be added to the plot with QCustomPlot::addPlottable, QCustomPlot then takes ownership of the statistical box.
Definition at line 7577 of file qcustomplot.cc.
|
virtual |
Definition at line 7607 of file qcustomplot.cc.
|
virtualslot |
Definition at line 7790 of file qcustomplot.cc.
|
protectedvirtual |
Implements QCPAbstractPlottable.
Definition at line 7802 of file qcustomplot.cc.
|
protectedvirtual |
Implements QCPAbstractPlottable.
Definition at line 7815 of file qcustomplot.cc.
|
protectedvirtual |
Definition at line 7844 of file qcustomplot.cc.
|
protectedvirtual |
Definition at line 7876 of file qcustomplot.cc.
|
protectedvirtual |
Definition at line 7830 of file qcustomplot.cc.
|
protectedvirtual |
Definition at line 7857 of file qcustomplot.cc.
|
protectedvirtual |
Implements QCPAbstractPlottable.
Definition at line 7885 of file qcustomplot.cc.
|
protectedvirtual |
Implements QCPAbstractPlottable.
Definition at line 7919 of file qcustomplot.cc.
|
inlineslot |
Definition at line 431 of file qcustomplot.h.
|
inlineslot |
Definition at line 433 of file qcustomplot.h.
|
inlineslot |
Definition at line 436 of file qcustomplot.h.
|
inlineslot |
Definition at line 434 of file qcustomplot.h.
|
inlineslot |
Definition at line 442 of file qcustomplot.h.
|
inlineslot |
Definition at line 432 of file qcustomplot.h.
|
inlineslot |
Definition at line 445 of file qcustomplot.h.
|
inlineslot |
Definition at line 444 of file qcustomplot.h.
|
inlineslot |
Definition at line 437 of file qcustomplot.h.
|
inlineslot |
Definition at line 443 of file qcustomplot.h.
|
slot |
Sets all parameters of the statistical box plot at once.
Definition at line 7694 of file qcustomplot.cc.
|
slot |
|
slot |
Sets the parameter "lower Quartile" of the statistical box plot. This is the lower end of the box. The lower and the upper quartiles are the two statistical quartiles around the median of the sample, they contain 50% of the sample data.
Definition at line 7637 of file qcustomplot.cc.
|
slot |
Sets the parameter "maximum" of the statistical box plot. This is the position of the upper whisker, typically the maximum measurement of the sample that's not considered an outlier.
Definition at line 7672 of file qcustomplot.cc.
|
slot |
Sets the parameter "median" of the statistical box plot. This is the value of the median mark inside the quartile box. The median separates the sample data in half (50% of the sample data is below/above the median).
Definition at line 7649 of file qcustomplot.cc.
|
slot |
Sets the pen used for drawing the median indicator line inside the statistical box.
Make sure to set the pen capStyle to Qt::FlatCap to prevent the median line from reaching a few pixels outside the box, when using a non-zero pen width.
Definition at line 7754 of file qcustomplot.cc.
|
slot |
Sets the parameter "minimum" of the statistical box plot. This is the position of the lower whisker, typically the minimum measurement of the sample that's not considered an outlier.
Definition at line 7625 of file qcustomplot.cc.
|
slot |
Sets the brush used to fill the outlier circles.
Definition at line 7784 of file qcustomplot.cc.
|
slot |
Sets the pen used to draw the outlier circles.
Definition at line 7774 of file qcustomplot.cc.
|
slot |
Sets a vector of outlier values that will be drawn as circles. Any data points in the sample that are not within the whiskers (setMinimum, setMaximum) should be considered outliers and displayed as such.
Definition at line 7684 of file qcustomplot.cc.
|
slot |
Sets the pixel size (diameter) of the circles that represent the outliers.
Definition at line 7764 of file qcustomplot.cc.
|
slot |
Sets the parameter "upper Quartile" of the statistical box plot. This is the upper end of the box. The lower and the upper quartiles are the two statistical quartiles around the median of the sample, they contain 50% of the sample data.
Definition at line 7661 of file qcustomplot.cc.
|
slot |
Sets the pen used for drawing the whisker bars (Those are the lines parallel to the key axis at each end of the backbone).
Definition at line 7743 of file qcustomplot.cc.
|
slot |
Sets the pen used for drawing the whisker backbone (That's the line parallel to the value axis).
Make sure to set the pen capStyle to Qt::FlatCap to prevent the backbone from reaching a few pixels past the bars, when using a non-zero pen width.
Definition at line 7732 of file qcustomplot.cc.
|
slot |
Sets the width of the whiskers (setMinimum, setMaximum) in key coordinates.
Definition at line 7719 of file qcustomplot.cc.
|
slot |
Sets the width of the box in key coordinates.
Definition at line 7709 of file qcustomplot.cc.
|
inlineslot |
Definition at line 435 of file qcustomplot.h.
|
inlineslot |
Definition at line 441 of file qcustomplot.h.
|
inlineslot |
Definition at line 440 of file qcustomplot.h.
|
inlineslot |
Definition at line 439 of file qcustomplot.h.
|
inlineslot |
Definition at line 438 of file qcustomplot.h.
|
friend |
Definition at line 488 of file qcustomplot.h.
|
friend |
Definition at line 487 of file qcustomplot.h.
|
protected |
Definition at line 470 of file qcustomplot.h.
|
protected |
Definition at line 470 of file qcustomplot.h.
|
protected |
Definition at line 470 of file qcustomplot.h.
|
protected |
Definition at line 470 of file qcustomplot.h.
|
protected |
Definition at line 474 of file qcustomplot.h.
|
protected |
Definition at line 470 of file qcustomplot.h.
|
protected |
Definition at line 475 of file qcustomplot.h.
|
protected |
Definition at line 474 of file qcustomplot.h.
|
protected |
Definition at line 469 of file qcustomplot.h.
|
protected |
Definition at line 473 of file qcustomplot.h.
|
protected |
Definition at line 470 of file qcustomplot.h.
|
protected |
Definition at line 474 of file qcustomplot.h.
|
protected |
Definition at line 474 of file qcustomplot.h.
|
protected |
Definition at line 472 of file qcustomplot.h.
|
protected |
Definition at line 471 of file qcustomplot.h.
1.8.11