|
| static QwtPlotCurve * | createCurve (QwtPlot *plot, const QString &title, const QVector< QPointF > &data, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create a curve from QPointF data and attach it to a plot
|
| |
| static QwtPlotCurve * | createCurve (QwtPlot *plot, const QString &title, const QVector< double > &x, const QVector< double > &y, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create a curve from separate x and y vectors and attach it to a plot
|
| |
| static QwtPlotCurve * | createCurve (QwtPlot *plot, const QString &title, const QVector< double > &y, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create a curve from y-only data (x = index) and attach it to a plot
|
| |
| static QwtPlotBarChart * | createBarChart (QwtPlot *plot, const QString &title, const QVector< double > &values, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create a bar chart from y-only values and attach it to a plot
|
| |
| static QwtPlotBarChart * | createBarChart (QwtPlot *plot, const QString &title, const QVector< QPointF > &data, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create a bar chart from QPointF data and attach it to a plot
|
| |
| static QwtPlotMultiBarChart * | createMultiBarChart (QwtPlot *plot, const QString &title, const QVector< QwtSetSample > &data, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create a multi bar chart from QwtSetSample data
|
| |
| static QwtPlotMultiBarChart * | createMultiBarChart (QwtPlot *plot, const QString &title, const QVector< QVector< double > > &data, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create a multi bar chart from nested vectors
|
| |
| static QwtPlotHistogram * | createHistogram (QwtPlot *plot, const QString &title, const QVector< QwtIntervalSample > &data, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create a histogram from interval samples
|
| |
| static QwtPlotIntervalCurve * | createIntervalCurve (QwtPlot *plot, const QString &title, const QVector< QwtIntervalSample > &data, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create an interval curve
|
| |
| static QwtPlotTradingCurve * | createTradingCurve (QwtPlot *plot, const QString &title, const QVector< QwtOHLCSample > &data, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create a trading curve (K-line / OHLC)
|
| |
| static QwtPlotSpectroCurve * | createSpectroCurve (QwtPlot *plot, const QString &title, const QVector< QwtPoint3D > &data, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create a spectro curve from 3D point data
|
| |
| static QwtPlotVectorField * | createVectorField (QwtPlot *plot, const QString &title, const QVector< QwtVectorFieldSample > &data, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create a vector field from samples
|
| |
| static QwtPlotBoxChart * | createBoxChart (QwtPlot *plot, const QString &title, const QVector< QwtBoxSample > &data, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create a box chart from box samples
|
| |
| static QwtPlotGrid * | createGrid (QwtPlot *plot, bool enableMinor=false, const QPen &majorPen=QPen(Qt::gray, 0, Qt::DotLine), const QPen &minorPen=QPen(Qt::lightGray, 0, Qt::DotLine)) |
| | Create and attach a grid to a plot
|
| |
| static QwtPlotMarker * | createMarker (QwtPlot *plot, const QPointF &pos, const QString &label=QString(), QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create a point marker with optional label
|
| |
| static QwtPlotMarker * | createHLine (QwtPlot *plot, double y, const QPen &pen=QPen(Qt::gray, 0, Qt::DashLine)) |
| | Create a horizontal line marker
|
| |
| static QwtPlotMarker * | createVLine (QwtPlot *plot, double x, const QPen &pen=QPen(Qt::gray, 0, Qt::DashLine)) |
| | Create a vertical line marker
|
| |
| static QwtPlotZoneItem * | createZone (QwtPlot *plot, const QwtInterval &interval, Qt::Orientation orientation=Qt::Vertical, const QBrush &brush=QBrush(QColor(0, 0, 255, 30))) |
| | Create a highlighted zone
|
| |
| static QwtPlotArrowMarker * | createArrowMarker (QwtPlot *plot, const QPointF &start, const QPointF &end, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Create an arrow marker
|
| |
| static QwtPlotGraphicItem * | createGraphic (QwtPlot *plot, const QRectF &rect, const QwtGraphic &graphic) |
| | Create a graphic item
|
| |
| static QwtPlotTextLabel * | createTextLabel (QwtPlot *plot, const QString &text, Qt::Alignment alignment=Qt::AlignTop|Qt::AlignHCenter) |
| | Create a text label on the canvas
|
| |
| static QwtPlotLegendItem * | createLegend (QwtPlot *plot) |
| | Create an in-canvas legend item
|
| |
| static QwtPlotScaleItem * | createScaleItem (QwtPlot *plot, QwtAxisId axis) |
| | Create a scale item at a specific axis
|
| |
Factory class for creating and attaching QwtPlotItem instances to a QwtPlot
QwtPlotFactory provides static methods to create various plot items with common default settings, set their data, and attach them to a plot in a single call. This simplifies the common pattern of: create item -> configure -> set data -> attach.
All factory methods return the newly created item, which is already attached to the plot. The caller owns the item and may further customize it.
QwtPlotCurve* curve = Qwt::QwtPlotFactory::createCurve(plot,
"My Curve", data);
Qwt::QwtPlotFactory::createGrid(plot);
Qwt::QwtPlotFactory::createHLine(plot, 2.5);
Definition qwt_clipper.h:41
A plot item, that represents a series of points
Definition qwt_plot_curve.h:75
A 2-D plotting widget
Definition qwt_plot.h:99
- 参见
- QwtPlotDataAccess, QwtPlotStyling