8000 Merge pull request #17129 from timhoffm/doc-default · QuLogic/matplotlib@44aa425 · GitHub
[go: up one dir, main page]

Skip to content

Commit 44aa425

Browse files
authored
Merge pull request matplotlib#17129 from timhoffm/doc-default
In docs remove 'optional' if 'default' can be given
2 parents 2f32371 + 0af8ebd commit 44aa425

File tree

18 files changed

+68
-68
lines changed

18 files changed

+68
-68
lines changed

examples/lines_bars_and_markers/filled_step.py

Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def stack_hist(ax, stacked_data, sty_cycle, bottoms=None,
9292
sty_cycle : Cycler or operable of dict
9393
Style to apply to each set
9494
95-
bottoms : array, optional, default: 0
95+
bottoms : array, default: 0
9696
The initial positions of the bottoms.
9797
9898
hist_func : callable, optional

lib/matplotlib/animation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def setup(self, fig, outfile, dpi=None):
209209
The figure object that contains the information for frames.
210210
outfile : str
211211
The filename of the resulting movie file.
212-
dpi : float, optional, default: ``fig.dpi``
212+
dpi : float, default: ``fig.dpi``
213213
The DPI (or resolution) for the file. This controls the size
214214
in pixels of the resulting movie file.
< 57A7 /td>
215215
"""
@@ -992,7 +992,7 @@ class to use, such as 'ffmpeg'.
992992
Controls the dots per inch for the movie frames. Together with
993993
the figure's size in inches, this controls the size of the movie.
994994
995-
codec : str, optional, default: :rc:`animation.codec`.
995+
codec : str, default: :rc:`animation.codec`.
996996
The video codec to use. Not all codecs are supported by a given
997997
`MovieWriter`.
998998

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6833,12 +6833,12 @@ def hist2d(self, x, y, bins=10, range=None, density=False, weights=None,
68336833
weights : array-like, shape (n, ), optional
68346834
An array of values w_i weighing each sample (x_i, y_i).
68356835
6836-
cmin : scalar, optional, default: None
6836+
cmin : scalar, default: None
68376837
All bins that has count less than cmin will not be displayed (set
68386838
to NaN before passing to imshow) and these count values in the
68396839
return value count histogram will also be set to nan upon return.
68406840
6841-
cmax : scalar, optional, default: None
6841+
cmax : scalar, default: None
68426842
All bins that has count more than cmax will not be displayed (set
68436843
to NaN before passing to imshow) and these count values in the
68446844
return value count histogram will also be set to nan upon return.

lib/matplotlib/axes/_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,8 @@ def __init__(self, fig, rect,
455455
The x or y `~.matplotlib.axis` is shared with the x or
456456
y axis in the input `~.axes.Axes`.
457457
458-
frameon : bool, optional
459-
True means that the axes frame is visible.
458+
frameon : bool, default: True
459+
Whether the axes frame is visible.
460460
461461
box_aspect : None, or a number, optional
462462
Sets the aspect of the axes box. See `~.axes.Axes.set_box_aspect`
@@ -906,7 +906,7 @@ def set_position(self, pos, which='both'):
906906
pos : [left, bottom, width, height] or `~matplotlib.transforms.Bbox`
907907
The new position of the in `.Figure` coordinates.
908908
909-
which : {'both', 'active', 'original'}, optional
909+
which : {'both', 'active', 'original'}, default: 'both'
910910
Determines which position variables to change.
911911
912912
"""

lib/matplotlib/backend_bases.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,11 +2317,11 @@ def key_press_handler(event, canvas=None, toolbar=None):
23172317
----------
23182318
event : `KeyEvent`
23192319
A key press/release event.
2320-
canvas : `FigureCanvasBase`, optional, default: ``event.canvas``
2320+
canvas : `FigureCanvasBase`, default: ``event.canvas``
23212321
The backend-specific canvas instance. This parameter is kept for
23222322
back-compatibility, but, if set, should always be equal to
23232323
``event.canvas``.
2324-
toolbar : `NavigationToolbar2`, optional, default: ``event.canvas.toolbar``
2324+
toolbar : `NavigationToolbar2`, default: ``event.canvas.toolbar``
23252325
The navigation cursor toolbar. This parameter is kept for
23262326
back-compatibility, but, if set, should always be equal to
23272327
``event.canvas.toolbar``.

lib/matplotlib/backends/backend_pgf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ def __init__(self, filename, *, keep_empty=True, metadata=None):
10041004
filename : str or path-like
10051005
Plots using `PdfPages.savefig` will be written to a file at this
10061006
location. Any older file with the same name is overwritten.
1007-
keep_empty : bool, optional
1007+
keep_empty : bool, default: True
10081008
If set to False, then empty pdf files will be deleted automatically
10091009
when closed.
10101010
metadata : dict, optional

lib/matplotlib/backends/qt_editor/_formlayout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def __init__(self, data, comment="", with_margin=False, parent=None):
218218
The data to be edited in the form.
219219
comment : str, optional
220220
221-
with_margin : bool, optional, default: False
221+
with_margin : bool, default: False
222222
If False, the form elements reach to the border of the widget.
223223
This is the desired behavior if the FormWidget is used as a widget
224224
alongside with other widgets such as a QComboBox, which also do

lib/matplotlib/collections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,7 @@ def __init__(self, segments, # Can be None.
12991299
antialiaseds : sequence, optional
13001300
A sequence of ones or zeros.
13011301
1302-
linestyles : str or tuple, optional
1302+
linestyles : str or tuple, default: 'solid'
13031303
Either one of {'solid', 'dashed', 'dashdot', 'dotted'}, or
13041304
a dash tuple. The dash tuple is::
13051305

lib/matplotlib/colors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,9 +1955,9 @@ def blend_hsv(self, rgb, intensity, hsv_max_sat=None, hsv_max_val=None,
19551955
An MxNx3 RGB array of floats ranging from 0 to 1 (color image).
19561956
intensity : ndarray
19571957
An MxNx1 array of floats ranging from 0 to 1 (grayscale image).
1958-
hsv_max_sat : number, optional, default: 1
1958+
hsv_max_sat : number, default: 1
19591959
The maximum saturation value that the *intensity* map can shift the
1960-
output image to. Defaults to 1.
1960+
output image to.
19611961
hsv_min_sat : number, optional
19621962
The minimum saturation value that the *intensity* map can shift the
19631963
output image to. Defaults to 0.

lib/matplotlib/markers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,11 @@ def __init__(self, marker=None, fillstyle=None):
213213
214214
Parameters
215215
----------
216-
marker : str or array-like, optional, default: None
216+
marker : str or array-like, default: None
217217
See the descriptions of possible markers in the module docstring.
218218
219-
fillstyle : str, optional, default: 'full'
220-
'full', 'left", 'right', 'bottom', 'top', 'none'
219+
fillstyle : str, default: 'full'
220+
One of 'full', 'left', 'right', 'bottom', 'top', 'none'.
221221
"""
222222
self._marker_function = None
223223
self.set_fillstyle(fillstyle)

0 commit comments

Comments
 (0)
0