graphinglib.Scatter.from_function#
- classmethod Scatter.from_function(func: Callable[[ArrayLike], ArrayLike], x_min: float, x_max: float, 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: int | Literal['default'] = 'default', marker_style: str = 'default', number_of_points: int = 30) Self [source]#
Creates a scatter plot from a function and a range of x values.
- Parameters:
- funcCallable[[ArrayLike], ArrayLike]
The function to be plotted.
- x_min, x_maxfloat
The scatter plot will be created for x values between x_min and x_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.
- 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_sizeint
Size of the points. Default depends on the
figure_style
configuration.- marker_stylestr
Style of the points. Default depends on the
figure_style
configuration.- number_of_pointsint
Number of points to be plotted. Defaults to 30.
- Returns:
- A
Scatter
object created from a function and a range of x values.
- A