QtiPlot
0.9.8.2
|
Box curve. More...
#include <BoxCurve.h>
Public Types | |
enum | BoxStyle { NoBox, Rect, Diamond, WindBox, Notch } |
enum | LabelsDisplayPolicy { Percentage, Value, PercentageValue, ValuePercentage } |
enum | Range { None, SD, SE, r25_75, r10_90, r5_95, r1_99, MinMax, UserDef } |
Public Member Functions | |
virtual QwtDoubleRect | boundingRect () const |
BoxCurve (Table *t, const QString &name, int startRow=0, int endRow=-1) | |
double | boxRange () |
int | boxRangeType () |
int | boxStyle () |
int | boxWidth () |
void | copy (BoxCurve *b) |
bool | hasBoxLabels () |
bool | hasWhiskerLabels () |
LabelsDisplayPolicy | labelsDisplayPolicy () |
void | loadData () |
QwtSymbol::Style | maxStyle () |
QwtSymbol::Style | meanStyle () |
double | median () |
QwtSymbol::Style | minStyle () |
QwtSymbol::Style | p1Style () |
QwtSymbol::Style | p99Style () |
double | quantile (double f) |
void | setBoxRange (int type, double coeff) |
void | setBoxStyle (int style) |
void | setBoxWidth (int width) |
void | setLabelsDisplayPolicy (const LabelsDisplayPolicy &policy) |
void | setMaxStyle (QwtSymbol::Style s) |
void | setMeanStyle (QwtSymbol::Style s) |
void | setMinStyle (QwtSymbol::Style s) |
void | setP1Style (QwtSymbol::Style s) |
void | setP99Style (QwtSymbol::Style s) |
void | setWhiskersRange (int type, double coeff=0.0) |
void | showBoxLabels (bool on=true) |
void | showWhiskerLabels (bool on=true) |
QString | statistics () |
double | whiskersRange () |
int | whiskersRangeType () |
![]() | |
void | addErrorBars (ErrorBarsCurve *c) |
Adds a single error bars curve to the list of attached error bars. | |
void | clearErrorBars () |
Clears the list of attached error bars. | |
void | clearLabels () |
Clears the list of attached text labels. | |
void | clone (DataCurve *c) |
DataCurve (Table *t, const QString &xColName, const QString &name, int startRow=0, int endRow=-1) | |
DataCurve (Table *xt, const QString &xColName, Table *yt, const QString &name, int startRow=0, int endRow=-1) | |
void | enableSpeedMode () |
int | endRow () |
QList< ErrorBarsCurve * > | errorBarsList () |
The list of attached error bars. | |
bool | hasLabels () |
bool | hasSelectedLabels () |
bool | hasVisibleLabels () |
bool | isFullRange () |
int | labelsAlignment () |
QColor | labelsColor () |
QString | labelsColumnName () |
QFont | labelsFont () |
double | labelsRotation () |
bool | labelsWhiteOut () |
int | labelsXOffset () |
int | labelsYOffset () |
void | moveLabels (const QPoint &pos) |
virtual QStringList | plotAssociation () |
A list of data sources for this curve. | |
void | remove () |
void | removeErrorBars (ErrorBarsCurve *c) |
Remove a single error bars curve from the list of attached error bars. | |
void | restoreLabels (const QStringList &lst) |
virtual QString | saveToString () |
bool | selectedLabels (const QPoint &pos) |
void | setDataSource (Table *yt, int ycol=1, Table *xt=NULL, int xcol=0) |
void | setFullRange () |
void | setLabelsAlignment (int flags) |
void | setLabelsColor (const QColor &c) |
void | setLabelsColumnName (const QString &name) |
void | setLabelsFont (const QFont &font) |
void | setLabelsOffset (int x, int y) |
void | setLabelsRotation (double angle) |
void | setLabelsSelected (bool on=true) |
void | setLabelsWhiteOut (bool whiteOut=true) |
void | setRowRange (int startRow, int endRow) |
void | setVisible (bool on) |
void | setVisibleLabels (bool on=true) |
void | setXColumnName (const QString &name) |
int | startRow () |
Table * | table () |
int | tableRow (int point) |
Returns the row index in the data source table corresponding to the data point index. | |
virtual void | updateColumnNames (const QString &oldName, const QString &newName, bool updateTableName) |
virtual bool | updateData (Table *t, const QString &colName) |
virtual void | updateLabelsPosition () |
QString | xColumnName () |
Table * | xTable () |
![]() | |
void | enableSideLines (bool on) |
PlotCurve (const QString &name=QString()) | |
int | plotStyle () |
The plot style of the curve. | |
void | restoreCurveLayout (const QStringList &lst) |
QString | saveCurveLayout () |
QString | saveCurveSymbolImage () |
void | setPlotStyle (int s) |
void | setSkipSymbolsCount (int count) |
Set the number of symbols not to be drawn: usefull for large data sets. | |
void | setType (int t) |
void | setXOffset (double dx) |
void | setYOffset (double dy) |
bool | sideLinesEnabled () |
int | skipSymbolsCount () |
Returns the number of symbols not to be drawn. | |
int | type () |
Sort of rtti() | |
double | xOffset () |
double | yOffset () |
Private Member Functions | |
void | createLabel (double val) |
void | draw (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const |
void | drawBox (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, double *dat, int size) const |
void | drawSymbols (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, double *dat, int size) const |
QString | labelPercentage (int index) |
QString | labelText (int index, double val) |
virtual void | loadLabels () |
double * | statisticValues () |
void | updateLabels (bool updateText=true) |
void | updateLabelsPosition () |
Private Attributes | |
double | b_coeff |
int | b_range |
int | b_style |
int | b_width |
bool | d_box_labels |
LabelsDisplayPolicy | d_labels_display |
bool | d_whiskers_labels |
QwtSymbol::Style | max_style |
QwtSymbol::Style | mean_style |
QwtSymbol::Style | min_style |
QwtSymbol::Style | p1_style |
QwtSymbol::Style | p99_style |
double | w_coeff |
int | w_range |
Additional Inherited Members | |
![]() | |
virtual void | drawCurve (QPainter *p, int style, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const |
virtual void | loadLabels () |
bool | validCurveType () |
![]() | |
double | d_click_pos_x |
Keep track of the coordinates of the point where the user clicked when selecting the labels. | |
double | d_click_pos_y |
std::vector< DataRange > | d_data_ranges |
int | d_end_row |
QList< ErrorBarsCurve * > | d_error_bars |
List of the error bar curves associated to this curve. | |
int | d_labels_align |
double | d_labels_angle |
QColor | d_labels_color |
QString | d_labels_column |
The name of the column used for text labels. | |
QFont | d_labels_font |
QList< PlotMarker * > | d_labels_list |
List of the text labels associated to this curve. | |
int | d_labels_x_offset |
int | d_labels_y_offset |
PlotMarker * | d_selected_label |
Keeps track of the plot marker on which the user clicked when selecting the labels. | |
bool | d_show_labels |
int | d_start_row |
Table * | d_table |
The data source table. | |
bool | d_white_out_labels |
QString | d_x_column |
The name of the column used for abscissae values. | |
Table * | d_x_table |
The data source table in case X and Y datasets are from different tables. |
Box curve.
enum BoxCurve::BoxStyle |
enum BoxCurve::Range |
BoxCurve::BoxCurve | ( | Table * | t, |
const QString & | name, | ||
int | startRow = 0 , |
||
int | endRow = -1 |
||
) |
|
virtual |
Reimplemented from PlotCurve.
|
inline |
References b_coeff.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
|
inline |
References b_range.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
|
inline |
References b_style.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
|
inline |
References b_width.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
void BoxCurve::copy | ( | BoxCurve * | b | ) |
|
private |
References b_style, b_width, DataCurve::d_labels_align, DataCurve::d_labels_angle, DataCurve::d_labels_color, DataCurve::d_labels_font, DataCurve::d_labels_list, DataCurve::d_labels_x_offset, DataCurve::d_labels_y_offset, DataCurve::d_white_out_labels, Diamond, labelText(), NoBox, Notch, and WindBox.
Referenced by loadLabels().
|
private |
References drawBox(), and drawSymbols().
|
private |
|
private |
|
inline |
References d_box_labels.
Referenced by copy(), and PlotDialog::setActiveCurve().
|
inline |
References d_whiskers_labels.
Referenced by copy(), and PlotDialog::setActiveCurve().
|
private |
|
inline |
References d_labels_display.
Referenced by copy().
|
private |
References d_box_labels, d_labels_display, d_whiskers_labels, labelPercentage(), Percentage, PercentageValue, Value, ValuePercentage, and w_range.
Referenced by createLabel(), and updateLabels().
|
virtual |
Reimplemented from DataCurve.
References Table::colIndex(), DataCurve::d_end_row, DataCurve::d_show_labels, DataCurve::d_start_row, DataCurve::d_table, loadLabels(), and Table::text().
Referenced by Graph::openBoxDiagram(), and Graph::plotBox().
|
privatevirtual |
References DataCurve::clearLabels(), createLabel(), DataCurve::d_show_labels, and statisticValues().
Referenced by loadData(), showBoxLabels(), and showWhiskerLabels().
|
inline |
References max_style.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
|
inline |
References mean_style.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
|
inline |
References quantile().
Referenced by drawBox(), and statistics().
|
inline |
References min_style.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
|
inline |
References p1_style.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
|
inline |
References p99_style.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
double BoxCurve::quantile | ( | double | f | ) |
Referenced by median().
void BoxCurve::setBoxRange | ( | int | type, |
double | coeff | ||
) |
References b_coeff, b_range, b_style, MinMax, r10_90, r1_99, r25_75, r5_95, PlotCurve::type(), updateLabels(), and WindBox.
Referenced by PlotDialog::applyBoxWhiskersFormatToCurve(), and Graph::openBoxDiagram().
void BoxCurve::setBoxStyle | ( | int | style | ) |
References b_style.
Referenced by PlotDialog::applyBoxWhiskersFormatToCurve(), and Graph::openBoxDiagram().
|
inline |
References b_width.
Referenced by PlotDialog::applyBoxWhiskersFormatToCurve(), and Graph::openBoxDiagram().
void BoxCurve::setLabelsDisplayPolicy | ( | const LabelsDisplayPolicy & | policy | ) |
References d_labels_display, and updateLabels().
|
inline |
References max_style.
Referenced by PlotDialog::applyPercentileFormatToCurve(), and Graph::openBoxDiagram().
|
inline |
References mean_style.
Referenced by PlotDialog::applyPercentileFormatToCurve(), and Graph::openBoxDiagram().
|
inline |
References min_style.
Referenced by PlotDialog::applyPercentileFormatToCurve(), and Graph::openBoxDiagram().
|
inline |
References p1_style.
Referenced by PlotDialog::applyPercentileFormatToCurve(), and Graph::openBoxDiagram().
|
inline |
References p99_style.
Referenced by PlotDialog::applyPercentileFormatToCurve(), and Graph::openBoxDiagram().
void BoxCurve::setWhiskersRange | ( | int | type, |
double | coeff = 0.0 |
||
) |
References MinMax, r10_90, r1_99, r25_75, r5_95, PlotCurve::type(), updateLabels(), w_coeff, and w_range.
Referenced by PlotDialog::applyBoxWhiskersFormatToCurve(), and Graph::openBoxDiagram().
void BoxCurve::showBoxLabels | ( | bool | on = true | ) |
References d_box_labels, DataCurve::d_show_labels, loadLabels(), and updateLabels().
Referenced by PlotDialog::applyBoxWhiskersFormatToCurve().
void BoxCurve::showWhiskerLabels | ( | bool | on = true | ) |
References DataCurve::d_show_labels, d_whiskers_labels, loadLabels(), and updateLabels().
Referenced by PlotDialog::applyBoxWhiskersFormatToCurve().
QString BoxCurve::statistics | ( | ) |
References median().
Referenced by PlotDialog::showBoxStatistics().
|
private |
References b_coeff, b_range, SD, SE, w_coeff, and w_range.
Referenced by loadLabels(), and updateLabels().
|
private |
References b_style, b_width, DataCurve::d_labels_align, DataCurve::d_labels_list, DataCurve::d_labels_x_offset, DataCurve::d_labels_y_offset, DataCurve::d_show_labels, Diamond, PlotMarker::index(), labelText(), NoBox, Notch, statisticValues(), and WindBox.
Referenced by copy(), setBoxRange(), setLabelsDisplayPolicy(), setWhiskersRange(), showBoxLabels(), showWhiskerLabels(), and updateLabelsPosition().
|
inlineprivate |
References updateLabels().
|
inline |
References w_coeff.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
|
inline |
References w_range.
Referenced by Graph::saveCurveLayout(), and PlotDialog::setActiveCurve().
|
private |
Referenced by boxRange(), copy(), drawBox(), labelPercentage(), setBoxRange(), and statisticValues().
|
private |
Referenced by boxRangeType(), copy(), drawBox(), labelPercentage(), setBoxRange(), and statisticValues().
|
private |
Referenced by boxStyle(), copy(), createLabel(), drawBox(), setBoxRange(), setBoxStyle(), and updateLabels().
|
private |
Referenced by boxWidth(), copy(), createLabel(), drawBox(), setBoxWidth(), and updateLabels().
|
private |
Referenced by copy(), hasBoxLabels(), labelText(), and showBoxLabels().
|
private |
Referenced by copy(), labelsDisplayPolicy(), labelText(), and setLabelsDisplayPolicy().
|
private |
Referenced by copy(), hasWhiskerLabels(), labelText(), and showWhiskerLabels().
|
private |
Referenced by copy(), drawSymbols(), maxStyle(), and setMaxStyle().
|
private |
Referenced by copy(), drawSymbols(), meanStyle(), and setMeanStyle().
|
private |
Referenced by copy(), drawSymbols(), minStyle(), and setMinStyle().
|
private |
Referenced by copy(), drawSymbols(), p1Style(), and setP1Style().
|
private |
Referenced by copy(), drawSymbols(), p99Style(), and setP99Style().
|
private |
Referenced by copy(), drawBox(), labelPercentage(), setWhiskersRange(), statisticValues(), and whiskersRange().
|
private |
Referenced by copy(), drawBox(), labelPercentage(), labelText(), setWhiskersRange(), statisticValues(), and whiskersRangeType().