graphinglib.Contour.__init__#
- Contour.__init__(z_data: ArrayLike, x_mesh: TypeAliasForwardRef('ArrayLike') | None = None, y_mesh: TypeAliasForwardRef('ArrayLike') | None = None, levels: int | TypeAliasForwardRef('ArrayLike') | Inherit = Inherit, color_map: str | Colormap | Inherit = Inherit, color_map_range: tuple[float, float] | None = None, show_color_bar: bool | Inherit = Inherit, filled: bool | Inherit = Inherit, alpha: float | Inherit = Inherit, line_widths: float | TypeAliasForwardRef('ArrayLike') | Inherit = Inherit) None[source]#
This class implements contour plots.
- Parameters:
- z_dataArrayLike
Data for each point of the mesh.
- x_mesh, y_meshArrayLike, optional
Mesh grids defining the coordinates of the contour values. If not provided, a mesh grid will be created based on the shape of
z_data.- levelsint | ArrayLike
If levels is an integer, it defines the number of levels to use in the contour. If levels is an array, it defines the value of each contour level. Typical range is
5to20when given as an integer. Default depends on thefigure_styleconfiguration.- color_mapstr or Colormap
The color map to use for the
Contour. Can either be specified as a string (named colormap from Matplotlib) or a Colormap object. 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.- filledbool
Wheter or not to fill the contour with color. Default depends on the
figure_styleconfiguration.- alphafloat
Opacity of the filled contour. Range is
0(transparent) to1(opaque). Default depends on thefigure_styleconfiguration.- line_widthsfloat | ArrayLike
If the contour is not filled, the width of the contour lines. If an array is provided, it defines the line width for each contour level. Typical range is
0.5to3points. Default depends on thefigure_styleconfiguration.