plopp.backends.matplotlib.scatter.Scatter#
- class plopp.backends.matplotlib.scatter.Scatter(canvas, data, x='x', y='y', uid=None, size=None, artist_number=0, colormapper=None, mask_color='black', cbar=False, **kwargs)[source]#
Artist to represent a two-dimensional scatter plot.
- Parameters:
canvas (
Canvas
) – The canvas that will display the scatter plot.data (
DataArray
) – The initial data to create the line from.x (
str
, default:'x'
) – The name of the coordinate that is to be used for the X positions.y (
str
, default:'y'
) – The name of the coordinate that is to be used for the Y positions.uid (
Optional
[str
], default:None
) – The unique identifier of the artist. If None, a random UUID is generated.size (
Union
[str
,float
,None
], default:None
) – The size of the markers.color – The color of the markers (this is ignored if a colorbar is used).
artist_number (
int
, default:0
) – Number of the artist (can be used to set the color of the artist).colormapper (
Optional
[ColorMapper
], default:None
) – The colormapper to use for the scatter plot.mask_color (
str
, default:'black'
) – The color of the masked points.cbar (
bool
, default:False
) – Whether to use a colorbar.
- __init__(canvas, data, x='x', y='y', uid=None, size=None, artist_number=0, colormapper=None, mask_color='black', cbar=False, **kwargs)[source]#
Methods
__init__
(canvas, data[, x, y, uid, size, ...])bbox
(xscale, yscale)The bounding box of the scatter points.
notify_artist
(message)Receive notification from the colormapper that its state has changed.
remove
()Remove the scatter and mask artists from the canvas.
update
(new_values)Update the x and y positions of the data points from new data.
Attributes
data