Series data¶
QwtSeriesData¶
-
class
qwt.series_data.
QwtSeriesData
[source]¶ Abstract interface for iterating over samples
python-qwt offers several implementations of the QwtSeriesData API, but in situations, where data of an application specific format needs to be displayed, without having to copy it, it is recommended to implement an individual data access.
A subclass of QwtSeriesData must implement:
size():
Should return number of data points.
sample()
Should return values x and y values of the sample at specific position as QPointF object.
boundingRect()
Should return the bounding rectangle of the data series. It is used for autoscaling and might help certain algorithms for displaying the data. The member _boundingRect is intended for caching the calculated rectangle.
-
setRectOfInterest
(rect)[source]¶ Set a the “rect of interest”
QwtPlotSeriesItem defines the current area of the plot canvas as “rectangle of interest” ( QwtPlotSeriesItem::updateScaleDiv() ). It can be used to implement different levels of details.
The default implementation does nothing.
Parameters: rect (QRectF) – Rectangle of interest
QwtPointArrayData¶
-
class
qwt.series_data.
QwtPointArrayData
(x=None, y=None, size=None)[source]¶ Interface for iterating over two array objects
-
class
QwtCQwtPointArrayDataolorMap
(x, y[, size=None])¶ Parameters: - x (list or tuple or numpy.array) – Array of x values
- y (list or tuple or numpy.array) – Array of y values
- size (int) – Size of the x and y arrays
-
QwtPointArrayData.
boundingRect
()[source]¶ Calculate the bounding rectangle
The bounding rectangle is calculated once by iterating over all points and is stored for all following requests.
Returns: Bounding rectangle
-
class
-
class
qwt.series_data.
QwtSeriesData
[source] Abstract interface for iterating over samples
python-qwt offers several implementations of the QwtSeriesData API, but in situations, where data of an application specific format needs to be displayed, without having to copy it, it is recommended to implement an individual data access.
A subclass of QwtSeriesData must implement:
size():
Should return number of data points.
sample()
Should return values x and y values of the sample at specific position as QPointF object.
boundingRect()
Should return the bounding rectangle of the data series. It is used for autoscaling and might help certain algorithms for displaying the data. The member _boundingRect is intended for caching the calculated rectangle.
-
setRectOfInterest
(rect)[source] Set a the “rect of interest”
QwtPlotSeriesItem defines the current area of the plot canvas as “rectangle of interest” ( QwtPlotSeriesItem::updateScaleDiv() ). It can be used to implement different levels of details.
The default implementation does nothing.
Parameters: rect (QRectF) – Rectangle of interest
-
size
()[source] Returns: Number of samples
-
sample
(i)[source] Return a sample
Parameters: i (int) – Index Returns: Sample at position i
-
boundingRect
()[source] Calculate the bounding rect of all samples
The bounding rect is necessary for autoscaling and can be used for a couple of painting optimizations.
Returns: Bounding rectangle
-
class
qwt.series_data.
QwtPointArrayData
(x=None, y=None, size=None)[source] Interface for iterating over two array objects
-
class
QwtCQwtPointArrayDataolorMap
(x, y[, size=None]) Parameters: - x (list or tuple or numpy.array) – Array of x values
- y (list or tuple or numpy.array) – Array of y values
- size (int) – Size of the x and y arrays
-
QwtPointArrayData.
boundingRect
()[source] Calculate the bounding rectangle
The bounding rectangle is calculated once by iterating over all points and is stored for all following requests.
Returns: Bounding rectangle
-
QwtPointArrayData.
size
()[source] Returns: Size of the data set
-
QwtPointArrayData.
sample
(index)[source] Parameters: index (int) – Index Returns: Sample at position index
-
QwtPointArrayData.
xData
()[source] Returns: Array of the x-values
-
QwtPointArrayData.
yData
()[source] Returns: Array of the y-values
-
class