Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 949ad9a

Browse files
authored
Merge pull request matplotlib#30422 from timhoffm/doc-none-as-not-given
DOC: remove some usages of None as explicit defaults
2 parents 780e66c + 838cfcb commit 949ad9a

File tree

3 files changed

+18
-22
lines changed

3 files changed

+18
-22
lines changed

‎lib/mpl_toolkits/axes_grid1/axes_grid.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ def __init__(self, fig,
8484
``121``), or as a `~.SubplotSpec`.
8585
nrows_ncols : (int, int)
8686
Number of rows and columns in the grid.
87-
n_axes : int or None, default: None
88-
If not None, only the first *n_axes* axes in the grid are created.
87+
n_axes : int, optional
88+
If given, only the first *n_axes* axes in the grid are created.
8989
direction : {"row", "column"}, default: "row"
9090
Whether axes are created in row-major ("row by row") or
9191
column-major order ("column by column"). This also affects the
@@ -322,8 +322,8 @@ def __init__(self, fig,
322322
as a three-digit subplot position code (e.g., "121").
323323
nrows_ncols : (int, int)
324324
Number of rows and columns in the grid.
325-
n_axes : int or None, default: None
326-
If not None, only the first *n_axes* axes in the grid are created.
325+
n_axes : int, optional
326+
If given, only the first *n_axes* axes in the grid are created.
327327
direction : {"row", "column"}, default: "row"
328328
Whether axes are created in row-major ("row by row") or
329329
column-major order ("column by column"). This also affects the
@@ -364,7 +364,7 @@ def __init__(self, fig,
364364
cbar_set_cax : bool, default: True
365365
If True, each axes in the grid has a *cax* attribute that is bound
366366
to associated *cbar_axes*.
367-
axes_class : subclass of `matplotlib.axes.Axes`, default: None
367+
axes_class : subclass of `matplotlib.axes.Axes`, default: `.mpl_axes.Axes`
368368
"""
369369
_api.check_in_list(["each", "single", "edge", None],
370370
cbar_mode=cbar_mode)

‎lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -737,9 +737,8 @@ def set_depthshade(
737737
depthshade : bool
738738
Whether to shade the patches in order to give the appearance of
739739
depth.
740-
depthshade_minalpha : float, default: None
740+
depthshade_minalpha : float, default: :rc:`axes3d.depthshade_minalpha`
741741
Sets the minimum alpha value used by depth-shading.
742-
If None, use the value from rcParams['axes3d.depthshade_minalpha'].
743742
744743
.. versionadded:: 3.11
745744
"""
@@ -1112,17 +1111,15 @@ def patch_collection_2d_to_3d(
11121111
zdir : {'x', 'y', 'z'}
11131112
The axis in which to place the patches. Default: "z".
11141113
See `.get_dir_vector` for a description of the values.
1115-
depthshade : bool, default: None
1114+
depthshade : bool, default: :rc:`axes3d.depthshade`
11161115
Whether to shade the patches to give a sense of depth.
1117-
If None, use the value from rcParams['axes3d.depthshade'].
11181116
axlim_clip : bool, default: False
11191117
Whether to hide patches with a vertex outside the axes view limits.
11201118
11211119
.. versionadded:: 3.10
11221120
1123-
depthshade_minalpha : float, default: None
1121+
depthshade_minalpha : float, default: :rc:`axes3d.depthshade_minalpha`
11241122
Sets the minimum alpha value used by depth-shading.
1125-
If None, use the value from rcParams['axes3d.depthshade_minalpha'].
11261123
11271124
.. versionadded:: 3.11
11281125
"""

‎lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __init__(
7070
----------
7171
fig : Figure
7272
The parent figure.
73-
rect : tuple (left, bottom, width, height), default: None.
73+
rect : tuple (left, bottom, width, height), default: (0, 0, 1, 1)
7474
The ``(left, bottom, width, height)`` Axes position.
7575
elev : float, default: 30
7676
The elevation angle in degrees rotates the camera above and below
@@ -2049,9 +2049,10 @@ def fill_between(self, x1, y1, z1, x2, y2, z2, *,
20492049
- 'auto': If the points all lie on the same 3D plane, 'polygon' is
20502050
used. Otherwise, 'quad' is used.
20512051
2052-
facecolors : list of :mpltype:`color`, default: None
2052+
facecolors : :mpltype:`color` or list of :mpltype:`color`, optional
20532053
Colors of each individual patch, or a single color to be used for
2054-
all patches.
2054+
all patches. If not given, the next color from the patch color
2055+
cycle is used.
20552056
20562057
shade : bool, default: None
20572058
Whether to shade the facecolors. If *None*, then defaults to *True*
@@ -2943,15 +2944,13 @@ def scatter(self, xs, ys, zs=0, zdir='z', s=20, c=None, depthshade=None,
29432944
- A 2D array in which the rows are RGB or RGBA.
29442945
29452946
For more details see the *c* argument of `~.axes.Axes.scatter`.
2946-
depthshade : bool, default: None
2947+
depthshade : bool, default: :rc:`axes3d.depthshade`
29472948
Whether to shade the scatter markers to give the appearance of
29482949
depth. Each call to ``scatter()`` will perform its depthshading
29492950
independently.
2950-
If None, use the value from rcParams['axes3d.depthshade'].
29512951
2952-
depthshade_minalpha : float, default: None
2952+
depthshade_minalpha : float, default: :rc:`axes3d.depthshade_minalpha`
29532953
The lowest alpha value applied by depth-shading.
2954-
If None, use the value from rcParams['axes3d.depthshade_minalpha'].
29552954
29562955
.. versionadded:: 3.11
29572956
@@ -3627,12 +3626,12 @@ def errorbar(self, x, y, z, zerr=None, yerr=None, xerr=None, fmt='',
36273626
Use 'none' (case-insensitive) to plot errorbars without any data
36283627
markers.
36293628
3630-
ecolor : :mpltype:`color`, default: None
3631-
The color of the errorbar lines. If None, use the color of the
3629+
ecolor : :mpltype:`color`, optional
3630+
The color of the errorbar lines. If not given, use the color of the
36323631
line connecting the markers.
36333632
3634-
elinewidth : float, default: None
3635-
The linewidth of the errorbar lines. If None, the linewidth of
3633+
elinewidth : float, optional
3634+
The linewidth of the errorbar lines. If not given, the linewidth of
36363635
the current style is used.
36373636
36383637
capsize : float, default: :rc:`errorbar.capsize`

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /