graphinglib.Scatter#
- class graphinglib.Scatter(x_data: ArrayLike, y_data: ArrayLike, label: str | None = None, face_color: str | ArrayLike | NoneType = 'default', edge_color: str | ArrayLike | NoneType = 'default', color_map: str | Colormap = 'default', show_color_bar: bool | Literal['default'] = 'default', marker_size: float | Literal['default'] = 'default', marker_style: str = 'default')[source]#
This class implements a general scatter plot.
- Parameters:
- x_data, y_dataArrayLike
Arrays of x and y values to be plotted.
- labelstr, optional
Label to be displayed in the legend.
- face_colorstr or ArrayLike or None
Face color of the points. If an array of intensities is provided, the values are mapped to the specified color map. If None, marker faces are transparent. Default depends on the
figure_style
configuration.- edge_colorstr or ArrayLike or None
Edge color of the points. If an array of intensities is provided, the values are mapped to the specified color map. If None, marker edges are transparent. Default depends on the
figure_style
configuration.- color_mapstr or Colormap
Color map of the stream lines, to be used in combination with the color parameter to specify intensity. Default depends on the
figure_style
configuration.- show_color_barbool
Whether or not to display the color bar next to the plot. Default depends on the
figure_style
configuration.- marker_sizefloat
Size of the points. Default depends on the
figure_style
configuration.- marker_stylestr
Style of the points. Default depends on the
figure_style
configuration.
Methods
__init__
(x_data, y_data[, label, ...])This class implements a general scatter plot.
add_errorbars
([x_error, y_error, cap_width, ...])Adds errorbars to the scatter plot.
copy
()Returns a deep copy of the
Scatter
object.create_point_at_x
(x[, interpolation_method, ...])Creates a Point on the curve at a given x value.
create_points_at_y
(y[, ...])Creates the Points on the curve at a given y value.
create_slice_x
(x_min, x_max[, label, ...])Creates a slice of the scatter plot between two x values.
create_slice_y
(y_min, y_max[, label, ...])Creates a slice of the scatter plot between two y values.
from_function
(func, x_min, x_max[, label, ...])Creates a scatter plot from a function and a range of x values.
get_coordinates_at_x
(x[, interpolation_method])Gets the coordinates of the point on the curve at a given x value.
get_coordinates_at_y
(y[, interpolation_method])Gets the coordinates the curve at a given y value.