PySide6.QtGraphs.QXYSeries¶
- class QXYSeries¶
- The - QXYSeriesclass is a parent class for all x & y series classes. More…- Inherited by: - QScatterSeries,- QLineSeries,- QSplineSeries- Synopsis¶- Properties¶
- colorᅟ- Main color of the series. For QLineSeries this means the line color and for QScatterSeries the color of the point
- selectedColorᅟ- Color of selected points
 - Methods¶- def - append()
- def - appendNp()
- def - at()
- def - bestFitLinePen()
- def - brush()
- def - clear()
- def - colorBy()
- def - count()
- def - deselectPoint()
- def - deselectPoints()
- def - insert()
- def - lightMarker()
- def - markerSize()
- def - pen()
- def - points()
- def - pointsVector()
- def - pointsVisible()
- def - remove()
- def - removePoints()
- def - replace()
- def - replaceNp()
- def - selectPoint()
- def - selectPoints()
- def - selectedColor()
- def - selectedPoints()
- def - setLightMarker()
- def - setMarkerSize()
- def - sizeBy()
 - Virtual methods¶- def - color()
- def - setBrush()
- def - setColor()
- def - setPen()
 - Signals¶
- def - clicked()
- def - colorChanged()
- def - doubleClicked()
- def - hovered()
- def - penChanged()
- def - pointAdded()
- def - pointRemoved()
- def - pointReplaced()
- def - pointsRemoved()
- def - pointsReplaced()
- def - pressed()
- def - released()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- In - QXYSeries, data points are defined as a list of QPointF, defining X and Y positions.- See also - class PointConfiguration¶
 - Note - Properties can be used directly when - from __feature__ import true_propertyis used or via accessor functions otherwise.- Access functions:
 - property bestFitLineVisibleᅟ: bool¶
 - Access functions:
 - This property holds The main color of the series. For - QLineSeriesthis means the line color and for- QScatterSeriesthe color of the point..- Access functions:
- Signal - colorChanged()
 
 - property pointLabelsClippingᅟ: bool¶
 - Access functions:
 - Access functions:
 - Access functions:
 - property pointLabelsFormatᅟ: str¶
 - Access functions:
 - property pointLabelsVisibleᅟ: bool¶
 - Access functions:
 - property pointsVisibleᅟ: bool¶
 - Access functions:
 - This property holds The color of selected points.. - Access functions:
 - append(points)¶
- Parameters:
- points – .list of QPointF 
 
 - Appends points with the coordinates - pointsto the series.- append(point)
- Parameters:
- point – - QPointF
 
 - append(x, y)
- Parameters:
- x – float 
- y – float 
 
 
 - Appends a point with the coordinates - xand- yto the series.- appendNp(x, y)¶
- Parameters:
- x – - PyArrayObject
- y – - PyArrayObject
 
 
 - Adds the list of data points specified by two one-dimensional, equally sized numpy arrays representing the x, y values, respectively. - Returns the point at the position specified by - index. Returns (0, 0) if the index is not valid.- Getter of property - bestFitLineColorᅟ.- Notification signal of property - bestFitLineColorᅟ.- bestFitLineEquation(ok)¶
- Parameters:
- ok – bool 
- Return type:
- .std.pairqreal,qreal 
 
 - bestFitLineVisibilityChanged(visible)¶
- Parameters:
- visible – bool 
 
 - Notification signal of property - bestFitLineVisibleᅟ.- bestFitLineVisible()¶
- Return type:
- bool 
 
 - Getter of property - bestFitLineVisibleᅟ.- clear()¶
 - Removes all points from the series. - clearPointConfiguration(index)¶
- Parameters:
- index – int 
 
 - clearPointConfiguration(index, key)
- Parameters:
- index – int 
- key – - PointConfiguration
 
 
 - clearPointsConfiguration()¶
 - clearPointsConfiguration(key)
- Parameters:
- key – - PointConfiguration
 
 - color()¶
- Return type:
 - See also 
 - Getter of property - colorᅟ.- colorBy(sourceData[, gradient=QLinearGradient()])¶
- Parameters:
- sourceData – .list of qreal 
- gradient – - QLinearGradient
 
 
 - Notification signal of property - colorᅟ.- count()¶
- Return type:
- int 
 
 - deselectAllPoints()¶
 - Deselects all points in the series. - deselectPoint(index)¶
- Parameters:
- index – int 
 
 - Deselects point at given - index.- deselectPoints(indexes)¶
- Parameters:
- indexes – .list of int 
 
 - Marks multiple points passed in a - indexeslist as deselected.- Inserts a point with the coordinates - pointto the position specified by- indexin the series. If the index is 0 or less than 0, the point is prepended to the list of points. If the index is equal to or greater than than the number of points in the series, the point is appended to the list of points.- isPointSelected(index)¶
- Parameters:
- index – int 
- Return type:
- bool 
 
 - markerSize()¶
- Return type:
- float 
 
 - markerSizeChanged(size)¶
- Parameters:
- size – float 
 
 - pointAdded(index)¶
- Parameters:
- index – int 
 
 - pointConfiguration(index)¶
- Parameters:
- index – int 
- Return type:
- Dictionary with keys of type .QXYSeries.PointConfiguration and values of type QVariant. 
 
 - pointLabelsClipping()¶
- Return type:
- bool 
 
 - Getter of property - pointLabelsClippingᅟ.- pointLabelsClippingChanged(clipping)¶
- Parameters:
- clipping – bool 
 
 - Notification signal of property - pointLabelsClippingᅟ.- Getter of property - pointLabelsColorᅟ.- Notification signal of property - pointLabelsColorᅟ.- Getter of property - pointLabelsFontᅟ.- Notification signal of property - pointLabelsFontᅟ.- pointLabelsFormat()¶
- Return type:
- str 
 
 - Getter of property - pointLabelsFormatᅟ.- pointLabelsFormatChanged(format)¶
- Parameters:
- format – str 
 
 - Notification signal of property - pointLabelsFormatᅟ.- pointLabelsVisibilityChanged(visible)¶
- Parameters:
- visible – bool 
 
 - Notification signal of property - pointLabelsVisibleᅟ.- pointLabelsVisible()¶
- Return type:
- bool 
 
 - Getter of property - pointLabelsVisibleᅟ.- pointRemoved(index)¶
- Parameters:
- index – int 
 
 - pointReplaced(index)¶
- Parameters:
- index – int 
 
 - This signal is emitted when a point is replaced at the position specified by - index.- See also - Returns the points in the series. - pointsConfiguration()¶
- Return type:
- Dictionary with keys of type .int and values of type QXYSeries.PointConfiguration. 
 
 - pointsConfigurationChanged(configuration)¶
- Parameters:
- configuration – Dictionary with keys of type .int and values of type QXYSeries.PointConfiguration. 
 
 - pointsRemoved(index, count)¶
- Parameters:
- index – int 
- count – int 
 
 
 - pointsReplaced()¶
 - This signal is emitted when all points are replaced. - pointsVisible()¶
- Return type:
- bool 
 
 - Getter of property - pointsVisibleᅟ.- remove(index)
- Parameters:
- index – int 
 
 - remove(x, y)
- Parameters:
- x – float 
- y – float 
 
 
 - Removes the point with the coordinates - xand- yfrom the series. Does nothing if the point does not exist.- removePoints(index, count)¶
- Parameters:
- index – int 
- count – int 
 
 
 - replace(points)¶
- Parameters:
- points – .list of QPointF 
 
 - Replaces the current points with the points specified by - points- Note - This is much faster than replacing data points one by one, or first clearing all data, and then appending the new data. Emits - pointsReplacedwhen the points have been replaced.- replace(index, newPoint)
- Parameters:
- index – int 
- newPoint – - QPointF
 
 
 - replace(index, newX, newY)
- Parameters:
- index – int 
- newX – float 
- newY – float 
 
 
 - Replaces the point at the position specified by - indexwith the point that has the coordinates- newXand- newY.- replace(oldX, oldY, newX, newY)
- Parameters:
- oldX – float 
- oldY – float 
- newX – float 
- newY – float 
 
 
 - Replaces the point with the coordinates - oldXand- oldYwith the point with the coordinates- newXand- newY. Does nothing if the old point does not exist.- replaceNp(x, y)¶
- Parameters:
- x – - PyArrayObject
- y – - PyArrayObject
 
 
 - Replaces the current points with the points specified by two one-dimensional, equally sized numpy arrays representing the x, y values, respectively. - selectAllPoints()¶
 - Marks all points in the series as selected, - selectPoint(index)¶
- Parameters:
- index – int 
 
 - Marks point at - indexas selected.- selectPoints(indexes)¶
- Parameters:
- indexes – .list of int 
 
 - Marks multiple points passed in a - indexeslist as selected.- selectedColor()¶
- Return type:
 - See also 
 - Notification signal of property - selectedColorᅟ.- selectedPoints()¶
- Return type:
- .list of int 
 
 - Returns a list of points indexes marked as selected. Selected points are visible regardless of points visibility. - See also - selectedPointsChanged()¶
 - Setter of property - bestFitLineColorᅟ.- setBestFitLineVisible([visible=true])¶
- Parameters:
- visible – bool 
 
 - Setter of property - bestFitLineVisibleᅟ.- Setter of property - colorᅟ.- setMarkerSize(size)¶
- Parameters:
- size – float 
 
 - setPointConfiguration(index, configuration)¶
- Parameters:
- index – int 
- configuration – Dictionary with keys of type .QXYSeries.PointConfiguration and values of type QVariant. 
 
 
 - setPointConfiguration(index, key, value)
- Parameters:
- index – int 
- key – - PointConfiguration
- value – object 
 
 
 - setPointLabelsClipping([enabled=true])¶
- Parameters:
- enabled – bool 
 
 - Setter of property - pointLabelsClippingᅟ.- Setter of property - pointLabelsColorᅟ.- Setter of property - pointLabelsFontᅟ.- setPointLabelsFormat(format)¶
- Parameters:
- format – str 
 
 - Setter of property - pointLabelsFormatᅟ.- setPointLabelsVisible([visible=true])¶
- Parameters:
- visible – bool 
 
 - Setter of property - pointLabelsVisibleᅟ.- setPointSelected(index, selected)¶
- Parameters:
- index – int 
- selected – bool 
 
 
 - Marks point at given - indexas either selected or deselected as specified by- selected.- Note - Selected points are drawn using the selected color if it was specified. Emits - selectedPointsChanged- setPointsConfiguration(pointsConfiguration)¶
- Parameters:
- pointsConfiguration – Dictionary with keys of type .int and values of type QXYSeries.PointConfiguration. 
 
 - setPointsVisible([visible=true])¶
- Parameters:
- visible – bool 
 
 - Setter of property - pointsVisibleᅟ.- Setter of property - selectedColorᅟ.- sizeBy(sourceData, minSize, maxSize)¶
- Parameters:
- sourceData – .list of qreal 
- minSize – float 
- maxSize – float 
 
 
 - toggleSelection(indexes)¶
- Parameters:
- indexes – .list of int 
 
 - Changes selection state of points at given - indexesto the opposite one.