Skip to content

DOC: remove some usages of None as explicit defaults #30422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/mpl_toolkits/axes_grid1/axes_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def __init__(self, fig,
``121``), or as a `~.SubplotSpec`.
nrows_ncols : (int, int)
Number of rows and columns in the grid.
n_axes : int or None, default: None
If not None, only the first *n_axes* axes in the grid are created.
n_axes : int, optional
If given, only the first *n_axes* axes in the grid are created.
direction : {"row", "column"}, default: "row"
Whether axes are created in row-major ("row by row") or
column-major order ("column by column"). This also affects the
Expand Down Expand Up @@ -322,8 +322,8 @@ def __init__(self, fig,
as a three-digit subplot position code (e.g., "121").
nrows_ncols : (int, int)
Number of rows and columns in the grid.
n_axes : int or None, default: None
If not None, only the first *n_axes* axes in the grid are created.
n_axes : int, optional
If given, only the first *n_axes* axes in the grid are created.
direction : {"row", "column"}, default: "row"
Whether axes are created in row-major ("row by row") or
column-major order ("column by column"). This also affects the
Expand Down Expand Up @@ -364,7 +364,7 @@ def __init__(self, fig,
cbar_set_cax : bool, default: True
If True, each axes in the grid has a *cax* attribute that is bound
to associated *cbar_axes*.
axes_class : subclass of `matplotlib.axes.Axes`, default: None
axes_class : subclass of `matplotlib.axes.Axes`, default: `.mpl_axes.Axes`
"""
_api.check_in_list(["each", "single", "edge", None],
cbar_mode=cbar_mode)
Expand Down
9 changes: 3 additions & 6 deletions lib/mpl_toolkits/mplot3d/art3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,8 @@ def set_depthshade(
depthshade : bool
Whether to shade the patches in order to give the appearance of
depth.
depthshade_minalpha : float, default: None
depthshade_minalpha : float, default: :rc:`axes3d.depthshade_minalpha`
Sets the minimum alpha value used by depth-shading.
If None, use the value from rcParams['axes3d.depthshade_minalpha'].

.. versionadded:: 3.11
"""
Expand Down Expand Up @@ -1112,17 +1111,15 @@ def patch_collection_2d_to_3d(
zdir : {'x', 'y', 'z'}
The axis in which to place the patches. Default: "z".
See `.get_dir_vector` for a description of the values.
depthshade : bool, default: None
depthshade : bool, default: :rc:`axes3d.depthshade`
Whether to shade the patches to give a sense of depth.
If None, use the value from rcParams['axes3d.depthshade'].
axlim_clip : bool, default: False
Whether to hide patches with a vertex outside the axes view limits.

.. versionadded:: 3.10

depthshade_minalpha : float, default: None
depthshade_minalpha : float, default: :rc:`axes3d.depthshade_minalpha`
Sets the minimum alpha value used by depth-shading.
If None, use the value from rcParams['axes3d.depthshade_minalpha'].

.. versionadded:: 3.11
"""
Expand Down
21 changes: 10 additions & 11 deletions lib/mpl_toolkits/mplot3d/axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(
----------
fig : Figure
The parent figure.
rect : tuple (left, bottom, width, height), default: None.
rect : tuple (left, bottom, width, height), default: (0, 0, 1, 1)
The ``(left, bottom, width, height)`` Axes position.
elev : float, default: 30
The elevation angle in degrees rotates the camera above and below
Expand Down Expand Up @@ -2049,9 +2049,10 @@ def fill_between(self, x1, y1, z1, x2, y2, z2, *,
- 'auto': If the points all lie on the same 3D plane, 'polygon' is
used. Otherwise, 'quad' is used.

facecolors : list of :mpltype:`color`, default: None
facecolors : :mpltype:`color` or list of :mpltype:`color`, optional
Colors of each individual patch, or a single color to be used for
all patches.
all patches. If not given, the next color from the patch color
cycle is used.

shade : bool, default: None
Whether to shade the facecolors. If *None*, then defaults to *True*
Expand Down Expand Up @@ -2943,15 +2944,13 @@ def scatter(self, xs, ys, zs=0, zdir='z', s=20, c=None, depthshade=None,
- 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: None
depthshade : bool, default: :rc:`axes3d.depthshade`
Whether to shade the scatter markers to give the appearance of
depth. Each call to ``scatter()`` will perform its depthshading
independently.
If None, use the value from rcParams['axes3d.depthshade'].

depthshade_minalpha : float, default: None
depthshade_minalpha : float, default: :rc:`axes3d.depthshade_minalpha`
The lowest alpha value applied by depth-shading.
If None, use the value from rcParams['axes3d.depthshade_minalpha'].

.. versionadded:: 3.11

Expand Down Expand Up @@ -3627,12 +3626,12 @@ def errorbar(self, x, y, z, zerr=None, yerr=None, xerr=None, fmt='',
Use 'none' (case-insensitive) to plot errorbars without any data
markers.

ecolor : :mpltype:`color`, default: None
The color of the errorbar lines. If None, use the color of the
ecolor : :mpltype:`color`, optional
The color of the errorbar lines. If not given, use the color of the
line connecting the markers.

elinewidth : float, default: None
The linewidth of the errorbar lines. If None, the linewidth of
elinewidth : float, optional
The linewidth of the errorbar lines. If not given, the linewidth of
the current style is used.

capsize : float, default: :rc:`errorbar.capsize`
Expand Down
Loading