plot_serializer.matplotlib.axesproxy.AxesProxy3D#
- class plot_serializer.matplotlib.axesproxy.AxesProxy3D(delegate: Axes3D, figure: Figure, serializer: Serializer)[source]#
Bases:
Proxy
[Axes3D
]Methods
Serialized parameters: x, y, color, linestyle, linewidth, marker, label.
Serialized parameters: x, y, z, label.
Serialized parameters: xs, ys, zs, s, c, cmap, norm, marker, label.
Attributes
Property that allows access to the delegate object which was given in the constructor.
- property delegate: T#
Property that allows access to the delegate object which was given in the constructor. This is useful when wanting to perform actions or access state from the underlying object.
- Returns:
The delegate object
- Return type:
T
- plot(x_values: Any, y_values: Any, *args: Any, **kwargs: Any) Path3DCollection [source]#
Serialized parameters: x, y, color, linestyle, linewidth, marker, label.
Plot 2D or 3D data.
- Parameters:
xs (1D array-like) – x coordinates of vertices.
ys (1D array-like) – y coordinates of vertices.
zs (float or 1D array-like) – z coordinates of vertices; either one for all points or one for each point.
zdir ({'x', 'y', 'z'}, default: 'z') – When plotting 2D data, the direction to use as z.
**kwargs – Other arguments are forwarded to matplotlib.axes.Axes.plot.
- plot_surface(x: Any, y: Any, z: Any, *args: Any, **kwargs: Any) Poly3DCollection [source]#
Serialized parameters: x, y, z, label.
Create a surface plot.
By default, it will be colored in shades of a solid color, but it also supports colormapping by supplying the cmap argument.
Note
The rcount and ccount kwargs, which both default to 50, determine the maximum number of samples used in each direction. If the input data is larger, it will be downsampled (by slicing) to these numbers of points.
Note
To maximize rendering speed consider setting rstride and cstride to divisors of the number of rows minus 1 and columns minus 1 respectively. For example, given 51 rows rstride can be any of the divisors of 50.
Similarly, a setting of rstride and cstride equal to 1 (or rcount and ccount equal the number of rows and columns) can use the optimized path.
- Parameters:
X (2D arrays) – Data values.
Y (2D arrays) – Data values.
Z (2D arrays) – Data values.
rcount (int) – Maximum number of samples used in each direction. If the input data is larger, it will be downsampled (by slicing) to these numbers of points. Defaults to 50.
ccount (int) – Maximum number of samples used in each direction. If the input data is larger, it will be downsampled (by slicing) to these numbers of points. Defaults to 50.
rstride (int) –
Downsampling stride in each direction. These arguments are mutually exclusive with rcount and ccount. If only one of rstride or cstride is set, the other defaults to 10.
’classic’ mode uses a default of
rstride = cstride = 10
instead of the new default ofrcount = ccount = 50
.cstride (int) –
Downsampling stride in each direction. These arguments are mutually exclusive with rcount and ccount. If only one of rstride or cstride is set, the other defaults to 10.
’classic’ mode uses a default of
rstride = cstride = 10
instead of the new default ofrcount = ccount = 50
.color (
color
) – Color of the surface patches.cmap (Colormap, optional) – Colormap of the surface patches.
facecolors (list of
color
) – Colors of each individual patch.norm (~matplotlib.colors.Normalize, optional) – Normalization for the colormap.
vmin (float, optional) – Bounds for the normalization.
vmax (float, optional) – Bounds for the normalization.
shade (bool, default: True) – Whether to shade the facecolors. Shading is always disabled when cmap is specified.
lightsource (~matplotlib.colors.LightSource, optional) – The lightsource to use when shade is True.
**kwargs – Other keyword arguments are forwarded to .Poly3DCollection.
- scatter(xs: Any, ys: Any, zs: Any, *args: Any, **kwargs: Any) Path3DCollection [source]#
Serialized parameters: xs, ys, zs, s, c, cmap, norm, marker, label.
Create a scatter plot.
- Parameters:
xs (array-like) – The data positions.
ys (array-like) – The data positions.
zs (float or array-like, default: 0) – The z-positions. Either an array of the same length as xs and ys or a single value to place all points in the same plane.
zdir ({'x', 'y', 'z', '-x', '-y', '-z'}, default: 'z') – The axis direction for the zs. This is useful when plotting 2D data on a 3D Axes. The data must be passed as xs, ys. Setting zdir to ‘y’ then plots the data to the x-z-plane.
s (float or array-like, default: 20) – The marker size in points**2. Either an array of the same length as xs and ys or a single value to make all markers the same size.
c (
color
, sequence, or sequence of colors, optional) –The marker color. Possible values:
A single color format string.
A sequence of colors of length n.
A sequence of n numbers to be mapped to colors using cmap and norm.
A 2D array in which the rows are RGB or RGBA.
For more details see the c argument of ~.axes.Axes.scatter.
depthshade (bool, default: True) – Whether to shade the scatter markers to give the appearance of depth. Each call to
scatter()
will perform its depthshading independently.data (indexable object, optional) – DATA_PARAMETER_PLACEHOLDER
**kwargs – All other keyword arguments are passed on to ~.axes.Axes.scatter.
- Returns:
paths
- Return type:
~matplotlib.collections.PathCollection