graphinglib.Scatter.create_slice_y#
- Scatter.create_slice_y(y_min: float, y_max: float, label: str | None = None, face_color: str | TypeAliasForwardRef('ArrayLike') | None | Inherit = Inherit, edge_color: str | TypeAliasForwardRef('ArrayLike') | None | Inherit = Inherit, color_map: str | Colormap | Inherit = Inherit, color_map_range: tuple[float, float] | None = None, show_color_bar: bool | Inherit = Inherit, marker_size: float | Inherit = Inherit, marker_edge_width: float | Inherit = Inherit, marker_style: str | Inherit = Inherit, alpha: float | Inherit = Inherit, copy_first: bool = False) Self[source]#
Creates a slice of the scatter plot between two y values.
- Parameters:
- y_min, y_maxfloat
The slice will be created between y_min and y_max.
- 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_styleconfiguration.- 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_styleconfiguration.- color_mapstr or Colormap
Color map used when
face_colororedge_coloris an array of intensity values. Examples include"viridis","plasma", and"coolwarm". Default depends on thefigure_styleconfiguration.- color_map_range: tuple[float, float], optional
The data range covered by the color map, given as
(minimum, maximum).- show_color_barbool
Whether or not to display the color bar next to the plot. Default depends on the
figure_styleconfiguration.- marker_sizefloat
Size of the points. Typical range is
10to100. Default depends on thefigure_styleconfiguration.- marker_edge_width: float
Line width of the marker edges. Typical range is
0to3points. Default depends on thefigure_styleconfiguration.- marker_stylestr
Style of the points. Common values include
".",",","o","v","^","<",">","s","p","*","h","H","+","x","D","d","|","_","P","X","None"," ", and"". Default depends on thefigure_styleconfiguration.- alphafloat
Opacities of the points. Range is
0(transparent) to1(opaque). Default depends on thefigure_styleconfiguration.- copy_firstbool
If
True, a copy of the scatter plot (with all its parameters) will be returned with the slice applied. Any other parameters passed to this method will also be applied to the copied scatter plot. IfFalse, a new scatter plot will be created with the slice applied and the parameters passed to this method.
- Returns:
Notes
Color parameters accept Matplotlib color formats: named colors (
"blue"), short color strings ("b"), hex strings ("#0000ff"), grayscale strings ("0.5"), and RGB/RGBA tuples with values between0and1((0, 0, 1)or(0, 0, 1, 0.5)). They may also be arrays of intensity values, which are mapped throughcolor_map.