QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 类型 | Public 成员函数 | Protected 成员函数 | 所有成员列表
QwtPlotBoxChart类 参考

箱线图(boxplot)绘图项 更多...

#include <qwt_plot_boxchart.h>

类 QwtPlotBoxChart 继承关系图:
QwtPlotSeriesItem QwtSeriesStore< QwtBoxSample > QwtPlotItem QwtAbstractSeriesStore QwtAbstractSeriesStore

class  PrivateData
 

Public 类型

enum  BoxStyle { NoBox , Rect , Diamond , Notch }
 箱体显示样式 更多...
 
enum  WhiskerStyle { NoWhiskers , StandardWhisker , MinMaxLine }
 须须显示样式 更多...
 
enum  PaintAttribute { ClipBoxes = 0x01 , ClipOutliers = 0x02 , ImageBuffer = 0x04 }
 性能优化的绘制属性 更多...
 
- Public 类型 继承自 QwtPlotItem
enum  RttiValues {
  Rtti_PlotItem = 0 , Rtti_PlotGrid , Rtti_PlotScale , Rtti_PlotLegend ,
  Rtti_PlotMarker , Rtti_PlotCurve , Rtti_PlotSpectroCurve , Rtti_PlotIntervalCurve ,
  Rtti_PlotHistogram , Rtti_PlotSpectrogram , Rtti_PlotGraphic , Rtti_PlotTradingCurve ,
  Rtti_PlotBarChart , Rtti_PlotMultiBarChart , Rtti_PlotShape , Rtti_PlotTextLabel ,
  Rtti_PlotZone , Rtti_PlotVectorField , Rtti_PlotArrowMarker , Rtti_PlotBoxChart ,
  Rtti_PlotUserItem = 1000
}
 运行时类型信息 更多...
 
enum  ItemAttribute { Legend = 0x01 , AutoScale = 0x02 , Margins = 0x04 }
 绘图项属性 更多...
 
enum  ItemInterest { ScaleInterest = 0x01 , LegendInterest = 0x02 }
 绘图项关注的事件类型 更多...
 
enum  RenderHint { RenderAntialiased = 0x1 }
 渲染提示 更多...
 

Public 成员函数

 QwtPlotBoxChart (const QString &title=QString())
 构造函数
 
 QwtPlotBoxChart (const QwtText &title)
 QwtText 标题的构造函数
 
virtual ~QwtPlotBoxChart ()
 析构函数
 
virtual int rtti () const override
 获取运行时类型信息
 
void setPaintAttribute (PaintAttribute, bool on=true)
 设置绘制属性
 
bool testPaintAttribute (PaintAttribute) const
 测试绘制属性是否启用
 
void setSamples (const QVector< QwtBoxSample > &)
 从向量设置箱体样本
 
void setSamples (QwtSeriesData< QwtBoxSample > *)
 从系列数据设置箱体样本
 
void setOutliers (const QVector< QwtBoxOutlierSample > &)
 从向量设置异常值样本
 
void setOutliers (QwtSeriesData< QwtBoxOutlierSample > *)
 从系列数据设置异常值样本
 
const QwtSeriesData< QwtBoxOutlierSample > * outlierData () const
 获取异常值数据
 
void setBoxStyle (BoxStyle)
 设置箱体样式
 
BoxStyle boxStyle () const
 获取箱体样式
 
void setWhiskerStyle (WhiskerStyle)
 设置须须样式
 
WhiskerStyle whiskerStyle () const
 获取须须样式
 
void setOrientation (Qt::Orientation)
 设置方向
 
Qt::Orientation orientation () const
 获取方向
 
void setBoxExtent (double extent)
 设置箱体范围(比例坐标中的宽度)
 
double boxExtent () const
 获取箱体范围
 
void setMinBoxWidth (double pixels)
 设置最小箱体宽度(像素)
 
double minBoxWidth () const
 获取最小箱体宽度
 
void setMaxBoxWidth (double pixels)
 设置最大箱体宽度(像素)
 
double maxBoxWidth () const
 获取最大箱体宽度
 
void setPen (const QColor &, qreal width=0.0, Qt::PenStyle=Qt::SolidLine)
 设置箱体轮廓和须须的画笔
 
void setPen (const QPen &)
 设置箱体轮廓和须须的画笔
 
const QPen & pen () const
 获取箱体轮廓和须须的画笔
 
void setBrush (const QBrush &)
 设置箱体填充的画刷
 
const QBrush & brush () const
 获取箱体填充的画刷
 
void setMedianPen (const QPen &)
 设置中位数线的画笔
 
QPen medianPen () const
 获取中位数线的画笔
 
void setOutlierSymbol (const QwtSymbol *)
 设置异常值的符号
 
const QwtSymboloutlierSymbol () const
 获取异常值的符号
 
void setMeanSymbol (const QwtSymbol *)
 设置均值标记的符号
 
const QwtSymbolmeanSymbol () const
 获取均值标记的符号
 
void setMedianVisible (bool)
 设置中位数线是否可见
 
bool isMedianVisible () const
 检查中位数线是否可见
 
void setMeanVisible (bool)
 设置均值标记是否可见
 
bool isMeanVisible () const
 检查均值标记是否可见
 
void setOutlierJitter (double jitterWidth)
 设置异常值抖动宽度
 
double outlierJitter () const
 获取异常值抖动宽度
 
virtual void drawSeries (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, int from, int to) const override
 绘制系列
 
virtual QRectF boundingRect () const override
 获取边界矩形
 
virtual QwtGraphic legendIcon (int index, const QSizeF &) const override
 获取图例图标
 
- Public 成员函数 继承自 QwtPlotSeriesItem
 QwtPlotSeriesItem (const QString &title=QString())
 构造函数
 
 QwtPlotSeriesItem (const QwtText &title)
 构造函数
 
virtual ~QwtPlotSeriesItem ()
 析构函数
 
void setOrientation (Qt::Orientation)
 设置绘图项的方向
 
Qt::Orientation orientation () const
 获取绘图项的方向
 
virtual void draw (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const override
 绘制完整系列
 
virtual void updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &) override
 更新刻度划分
 
- Public 成员函数 继承自 QwtPlotItem
 QwtPlotItem ()
 Default constructor
 
 QwtPlotItem (const QString &title)
 Constructor with title as QString
 
 QwtPlotItem (const QwtText &title)
 Constructor with title as QwtText
 
virtual ~QwtPlotItem ()
 Destructor
 
void attach (QwtPlot *plot)
 Attach the item to a plot
 
void detach ()
 Detach the item from the plot
 
QwtPlotplot () const
 Get the plot the item is attached to
 
void setTitle (const QString &title)
 Set the title using a QString
 
void setTitle (const QwtText &title)
 Set the title using a QwtText
 
const QwtTexttitle () const
 Get the title
 
void setItemAttribute (ItemAttribute, bool on=true)
 Set an item attribute
 
bool testItemAttribute (ItemAttribute) const
 Test an item attribute
 
void setItemInterest (ItemInterest, bool on=true)
 Set an item interest
 
bool testItemInterest (ItemInterest) const
 Test an item interest
 
void setRenderHint (RenderHint, bool on=true)
 Set a render hint
 
bool testRenderHint (RenderHint) const
 Test a render hint
 
void setRenderThreadCount (uint numThreads)
 Set the number of render threads
 
uint renderThreadCount () const
 Get the number of render threads
 
void setLegendIconSize (const QSize &)
 Set the legend icon size
 
QSize legendIconSize () const
 Get the legend icon size
 
double z () const
 Get the z-value
 
void setZ (double z)
 Set the z-value
 
void show ()
 Show the item
 
void hide ()
 Hide the item
 
virtual void setVisible (bool)
 Set the visibility
 
bool isVisible () const
 Check if the item is visible
 
void setAxes (QwtAxisId xAxis, QwtAxisId yAxis)
 Set both axes
 
void setXAxis (QwtAxisId)
 Set the x-axis
 
QwtAxisId xAxis () const
 Get the x-axis
 
void setYAxis (QwtAxisId)
 Set the y-axis
 
QwtAxisId yAxis () const
 Get the y-axis
 
virtual void itemChanged ()
 Notify the plot that the item has changed
 
virtual void legendChanged ()
 Notify the item that the legend has changed
 
virtual void getCanvasMarginHint (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const
 Get margin hints for the canvas
 
virtual void updateLegend (const QwtPlotItem *, const QList< QwtLegendData > &)
 Update the item with changes of the legend
 
QRectF scaleRect (const QwtScaleMap &, const QwtScaleMap &) const
 Calculate the scale rectangle
 
QRectF paintRect (const QwtScaleMap &, const QwtScaleMap &) const
 Calculate the paint rectangle
 
virtual QList< QwtLegendDatalegendData () const
 Return legend data
 
- Public 成员函数 继承自 QwtSeriesStore< QwtBoxSample >
void setData (QwtSeriesData< QwtBoxSample > *series)
 
QwtSeriesData< QwtBoxSample > * data ()
 
const QwtSeriesData< QwtBoxSample > * data () const
 
QwtBoxSample sample (size_t index) const
 
virtual size_t dataSize () const override
 
virtual QRectF dataRect () const override
 
virtual void setRectOfInterest (const QRectF &rect) override
 Set a the "rectangle of interest" for the stored series
 
QwtSeriesData< QwtBoxSample > * swapData (QwtSeriesData< QwtBoxSample > *series)
 

Protected 成员函数

void init ()
 Initialize
 
virtual double scaledBoxWidth (const QwtScaleMap &posMap, const QwtScaleMap &valueMap, const QRectF &canvasRect) const
 Calculate scaled box width in pixels
 
virtual void drawBox (QPainter *, const QwtBoxSample &, Qt::Orientation, double boxWidth, double posPixel, const QwtScaleMap &valueMap) const
 Draw a single box
 
virtual void drawWhiskers (QPainter *, const QwtBoxSample &, Qt::Orientation, double boxWidth, double posPixel, const QwtScaleMap &valueMap) const
 Draw whiskers for a single box
 
virtual void drawMedian (QPainter *, const QwtBoxSample &, Qt::Orientation, double boxWidth, double posPixel, const QwtScaleMap &valueMap) const
 Draw median line for a single box
 
virtual void drawOutliers (QPainter *, const QwtScaleMap &posMap, const QwtScaleMap &valueMap, const QRectF &canvasRect, int from, int to) const
 Draw outliers for boxes in range
 
virtual void drawOutlierSymbol (QPainter *, double posPixel, double valuePixel, const QwtSymbol &symbol) const
 Draw a single outlier symbol
 
- Protected 成员函数 继承自 QwtPlotSeriesItem
virtual void dataChanged () override
 dataChanged() indicates, that the series has been changed.
 
- Protected 成员函数 继承自 QwtPlotItem
QwtGraphic defaultIcon (const QBrush &, const QSizeF &) const
 Create a default icon
 

详细描述

箱线图(boxplot)绘图项

成员枚举类型说明

◆ BoxStyle

箱体显示样式

枚举值
NoBox 

No box body, only whiskers and outliers

Rect 

Traditional rectangular box (Q1-Q3)

Diamond 

Diamond shape connecting extremes

Notch 

Rectangle with notch indentation at median

◆ PaintAttribute

性能优化的绘制属性

枚举值
ClipBoxes 

Clip boxes before painting (performance for zoomed views)

ClipOutliers 

Clip outlier symbols before painting

ImageBuffer 

Use image buffer for rendering (optimization for many boxes)

◆ WhiskerStyle

须须显示样式

枚举值
NoWhiskers 

No whisker lines drawn

StandardWhisker 

Traditional T-bar whiskers with horizontal caps (default)

MinMaxLine 

Simple line from whiskerLower to whiskerUpper

构造及析构函数说明

◆ QwtPlotBoxChart() [1/2]

QwtPlotBoxChart::QwtPlotBoxChart ( const QString &  title = QString())
explicit

构造函数

构造函数

◆ QwtPlotBoxChart() [2/2]

QwtPlotBoxChart::QwtPlotBoxChart ( const QwtText title)
explicit

QwtText 标题的构造函数

构造函数

◆ ~QwtPlotBoxChart()

QwtPlotBoxChart::~QwtPlotBoxChart ( )
virtual

析构函数

析构函数

成员函数说明

◆ boundingRect()

QRectF QwtPlotBoxChart::boundingRect ( ) const
overridevirtual

获取边界矩形

重载 QwtPlotSeriesItem .

◆ boxExtent()

double QwtPlotBoxChart::boxExtent ( ) const

获取箱体范围

◆ boxStyle()

QwtPlotBoxChart::BoxStyle QwtPlotBoxChart::boxStyle ( ) const

获取箱体样式

◆ brush()

const QBrush & QwtPlotBoxChart::brush ( ) const

获取箱体填充的画刷

◆ drawSeries()

void QwtPlotBoxChart::drawSeries ( QPainter *  painter,
const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QRectF &  canvasRect,
int  from,
int  to 
) const
overridevirtual

绘制系列

实现了 QwtPlotSeriesItem.

◆ isMeanVisible()

bool QwtPlotBoxChart::isMeanVisible ( ) const

检查均值标记是否可见

◆ isMedianVisible()

bool QwtPlotBoxChart::isMedianVisible ( ) const

检查中位数线是否可见

◆ legendIcon()

QwtGraphic QwtPlotBoxChart::legendIcon ( int  index,
const QSizeF &  size 
) const
overridevirtual

获取图例图标

重载 QwtPlotItem .

◆ maxBoxWidth()

double QwtPlotBoxChart::maxBoxWidth ( ) const

获取最大箱体宽度

◆ meanSymbol()

const QwtSymbol * QwtPlotBoxChart::meanSymbol ( ) const

获取均值标记的符号

◆ medianPen()

QPen QwtPlotBoxChart::medianPen ( ) const

获取中位数线的画笔

◆ minBoxWidth()

double QwtPlotBoxChart::minBoxWidth ( ) const

获取最小箱体宽度

◆ orientation()

Qt::Orientation QwtPlotBoxChart::orientation ( ) const

获取方向

◆ outlierData()

const QwtSeriesData< QwtBoxOutlierSample > * QwtPlotBoxChart::outlierData ( ) const

获取异常值数据

◆ outlierJitter()

double QwtPlotBoxChart::outlierJitter ( ) const

获取异常值抖动宽度

◆ outlierSymbol()

const QwtSymbol * QwtPlotBoxChart::outlierSymbol ( ) const

获取异常值的符号

◆ pen()

const QPen & QwtPlotBoxChart::pen ( ) const

获取箱体轮廓和须须的画笔

◆ rtti()

int QwtPlotBoxChart::rtti ( ) const
overridevirtual

获取运行时类型信息

重载 QwtPlotItem .

◆ setBoxExtent()

void QwtPlotBoxChart::setBoxExtent ( double  extent)

设置箱体范围(比例坐标中的宽度)

◆ setBoxStyle()

void QwtPlotBoxChart::setBoxStyle ( BoxStyle  style)

设置箱体样式

◆ setBrush()

void QwtPlotBoxChart::setBrush ( const QBrush &  brush)

设置箱体填充的画刷

◆ setMaxBoxWidth()

void QwtPlotBoxChart::setMaxBoxWidth ( double  pixels)

设置最大箱体宽度(像素)

◆ setMeanSymbol()

void QwtPlotBoxChart::setMeanSymbol ( const QwtSymbol symbol)

设置均值标记的符号

◆ setMeanVisible()

void QwtPlotBoxChart::setMeanVisible ( bool  visible)

设置均值标记是否可见

◆ setMedianPen()

void QwtPlotBoxChart::setMedianPen ( const QPen &  pen)

设置中位数线的画笔

◆ setMedianVisible()

void QwtPlotBoxChart::setMedianVisible ( bool  visible)

设置中位数线是否可见

◆ setMinBoxWidth()

void QwtPlotBoxChart::setMinBoxWidth ( double  pixels)

设置最小箱体宽度(像素)

◆ setOrientation()

void QwtPlotBoxChart::setOrientation ( Qt::Orientation  orient)

设置方向

◆ setOutlierJitter()

void QwtPlotBoxChart::setOutlierJitter ( double  jitterWidth)

设置异常值抖动宽度

◆ setOutliers() [1/2]

void QwtPlotBoxChart::setOutliers ( const QVector< QwtBoxOutlierSample > &  samples)

从向量设置异常值样本

◆ setOutliers() [2/2]

void QwtPlotBoxChart::setOutliers ( QwtSeriesData< QwtBoxOutlierSample > *  data)

从系列数据设置异常值样本

◆ setOutlierSymbol()

void QwtPlotBoxChart::setOutlierSymbol ( const QwtSymbol symbol)

设置异常值的符号

◆ setPaintAttribute()

void QwtPlotBoxChart::setPaintAttribute ( PaintAttribute  attr,
bool  on = true 
)

设置绘制属性

◆ setPen() [1/2]

void QwtPlotBoxChart::setPen ( const QColor &  color,
qreal  width = 0.0,
Qt::PenStyle  style = Qt::SolidLine 
)

设置箱体轮廓和须须的画笔

◆ setPen() [2/2]

void QwtPlotBoxChart::setPen ( const QPen &  pen)

设置箱体轮廓和须须的画笔

◆ setSamples() [1/2]

void QwtPlotBoxChart::setSamples ( const QVector< QwtBoxSample > &  samples)

从向量设置箱体样本

◆ setSamples() [2/2]

void QwtPlotBoxChart::setSamples ( QwtSeriesData< QwtBoxSample > *  data)

从系列数据设置箱体样本

◆ setWhiskerStyle()

void QwtPlotBoxChart::setWhiskerStyle ( WhiskerStyle  style)

设置须须样式

◆ testPaintAttribute()

bool QwtPlotBoxChart::testPaintAttribute ( PaintAttribute  attr) const

测试绘制属性是否启用

◆ whiskerStyle()

QwtPlotBoxChart::WhiskerStyle QwtPlotBoxChart::whiskerStyle ( ) const

获取须须样式


该类的文档由以下文件生成: