Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 236700c

Browse files
authored
Merge pull request #7333 from QuLogic/doc-headings
DOC: Fix headings and call signatures
2 parents b191f85 + f1e9843 commit 236700c

File tree

17 files changed

+46
-253
lines changed

17 files changed

+46
-253
lines changed

lib/matplotlib/artist.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,8 @@ def pickable(self):
426426
self._picker is not None)
427427

428428
def pick(self, mouseevent):
429-
"""Process pick event
430-
431-
call signature::
432-
433-
pick(mouseevent)
429+
"""
430+
Process pick event
434431
435432
each child artist will fire a pick event if *mouseevent* is over
436433
the artist and the artist has picker set

lib/matplotlib/axes/_axes.py

Lines changed: 10 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
751751
752752
753753
Examples
754-
---------
754+
--------
755755
* draw a thick red vline at *x* = 0 that spans the yrange::
756756
757757
>>> axvline(linewidth=4, color='r')
@@ -1034,7 +1034,7 @@ def vlines(self, x, ymin, ymax, colors='k', linestyles='solid',
10341034
hlines : horizontal lines
10351035
10361036
Examples
1037-
---------
1037+
--------
10381038
.. plot:: mpl_examples/pylab_examples/vline_hline_demo.py
10391039
10401040
"""
@@ -1089,12 +1089,6 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
10891089
"""
10901090
Plot identical parallel lines at specific positions.
10911091
1092-
Call signature::
1093-
1094-
eventplot(positions, orientation='horizontal', lineoffsets=0,
1095-
linelengths=1, linewidths=None, color =None,
1096-
linestyles='solid'
1097-
10981092
Plot parallel lines at the given positions. positions should be a 1D
10991093
or 2D array-like object, with each row corresponding to a row or column
11001094
of lines.
@@ -1497,10 +1491,6 @@ def loglog(self, *args, **kwargs):
14971491
"""
14981492
Make a plot with log scaling on both the *x* and *y* axis.
14991493
1500-
Call signature::
1501-
1502-
loglog(*args, **kwargs)
1503-
15041494
:func:`~matplotlib.pyplot.loglog` supports all the keyword
15051495
arguments of :func:`~matplotlib.pyplot.plot` and
15061496
:meth:`matplotlib.axes.Axes.set_xscale` /
@@ -1702,7 +1692,7 @@ def acorr(self, x, **kwargs):
17021692
- `b` is the x-axis.
17031693
17041694
Other parameters
1705-
-----------------
1695+
----------------
17061696
linestyle : `~matplotlib.lines.Line2D` prop, optional, default: None
17071697
Only used if usevlines is False.
17081698
@@ -1766,7 +1756,7 @@ def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none,
17661756
- `b` is the x-axis (none, if plot is used).
17671757
17681758
Other parameters
1769-
-----------------
1759+
----------------
17701760
linestyle : `~matplotlib.lines.Line2D` prop, optional, default: None
17711761
Only used if usevlines is False.
17721762
@@ -2231,7 +2221,7 @@ def barh(self, bottom, width, height=0.8, left=None, **kwargs):
22312221
the x coordinates of the left sides of the bars
22322222
22332223
Returns
2234-
--------
2224+
-------
22352225
`matplotlib.patches.Rectangle` instances.
22362226
22372227
Other parameters
@@ -2304,10 +2294,6 @@ def broken_barh(self, xranges, yrange, **kwargs):
23042294
"""
23052295
Plot horizontal bars.
23062296
2307-
Call signature::
2308-
2309-
broken_barh(self, xranges, yrange, **kwargs)
2310-
23112297
A collection of horizontal bars spanning *yrange* with a sequence of
23122298
*xranges*.
23132299
@@ -2494,15 +2480,6 @@ def pie(self, x, explode=None, labels=None, colors=None,
24942480
r"""
24952481
Plot a pie chart.
24962482
2497-
Call signature::
2498-
2499-
pie(x, explode=None, labels=None,
2500-
colors=None,
2501-
autopct=None, pctdistance=0.6, shadow=False,
2502-
labeldistance=1.1, startangle=None, radius=None,
2503-
counterclock=True, wedgeprops=None, textprops=None,
2504-
center = (0, 0), frame = False )
2505-
25062483
Make a pie chart of array *x*. The fractional area of each
25072484
wedge is given by x/sum(x). If sum(x) <= 1, then the values
25082485
of x give the fractional area directly and the array will not
@@ -3111,17 +3088,6 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
31113088
"""
31123089
Make a box and whisker plot.
31133090
3114-
Call signature::
3115-
3116-
boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
3117-
positions=None, widths=None, patch_artist=False,
3118-
bootstrap=None, usermedians=None, conf_intervals=None,
3119-
meanline=False, showmeans=False, showcaps=True,
3120-
showbox=True, showfliers=True, boxprops=None,
3121-
labels=None, flierprops=None, medianprops=None,
3122-
meanprops=None, capprops=None, whiskerprops=None,
3123-
manage_xticks=True, autorange=False, zorder=None):
3124-
31253091
Make a box and whisker plot for each column of ``x`` or each
31263092
vector in sequence ``x``. The box extends from the lower to
31273093
upper quartile values of the data, with a line at the median.
@@ -3421,15 +3387,6 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
34213387
"""
34223388
Drawing function for box and whisker plots.
34233389
3424-
Call signature::
3425-
3426-
bxp(self, bxpstats, positions=None, widths=None, vert=True,
3427-
patch_artist=False, shownotches=False, showmeans=False,
3428-
showcaps=True, showbox=True, showfliers=True,
3429-
boxprops=None, whiskerprops=None, flierprops=None,
3430-
medianprops=None, capprops=None, meanprops=None,
3431-
meanline=False, manage_xticks=True, zorder=None):
3432-
34333390
Make a box and whisker plot for each column of *x* or each
34343391
vector in sequence *x*. The box extends from the lower to
34353392
upper quartile values of the data, with a line at the median.
@@ -4900,10 +4857,6 @@ def fill_betweenx(self, y, x1, x2=0, where=None,
49004857
"""
49014858
Make filled polygons between two horizontal curves.
49024859
4903-
Call signature::
4904-
4905-
fill_betweenx(y, x1, x2=0, where=None, **kwargs)
4906-
49074860
Create a :class:`~matplotlib.collections.PolyCollection`
49084861
filling the regions between *x1* and *x2* where
49094862
``where==True``
@@ -5034,7 +4987,7 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
50344987
Display an image on the axes.
50354988
50364989
Parameters
5037-
-----------
4990+
----------
50384991
X : array_like, shape (n, m) or (n, m, 3) or (n, m, 4)
50394992
Display the image in `X` to current axes. `X` may be an
50404993
array or a PIL image. If `X` is an array, it
@@ -5117,7 +5070,7 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
51175070
when interpolation is one of: 'sinc', 'lanczos' or 'blackman'
51185071
51195072
Returns
5120-
--------
5073+
-------
51215074
image : `~matplotlib.image.AxesImage`
51225075
51235076
Other parameters
@@ -6528,7 +6481,7 @@ def hist2d(self, x, y, bins=10, range=None, normed=False, weights=None,
65286481
The return value is ``(counts, xedges, yedges, Image)``.
65296482
65306483
Other parameters
6531-
-----------------
6484+
----------------
65326485
kwargs : :meth:`pcolorfast` properties.
65336486
65346487
See also
@@ -7066,12 +7019,6 @@ def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
70667019
"""
70677020
Plot the coherence between *x* and *y*.
70687021
7069-
Call signature::
7070-
7071-
cohere(x, y, NFFT=256, Fs=2, Fc=0, detrend = mlab.detrend_none,
7072-
window = mlab.window_hanning, noverlap=0, pad_to=None,
7073-
sides='default', scale_by_freq=None, **kwargs)
7074-
70757022
Plot the coherence between *x* and *y*. Coherence is the
70767023
normalized cross spectral density:
70777024
@@ -7448,13 +7395,8 @@ def matshow(self, Z, **kwargs):
74487395
def violinplot(self, dataset, positions=None, vert=True, widths=0.5,
74497396
showmeans=False, showextrema=True, showmedians=False,
74507397
points=100, bw_method=None):
7451-
"""Make a violin plot.
7452-
7453-
Call signature::
7454-
7455-
violinplot(dataset, positions=None, vert=True, widths=0.5,
7456-
showmeans=False, showextrema=True, showmedians=False,
7457-
points=100, bw_method=None):
7398+
"""
7399+
Make a violin plot.
74587400
74597401
Make a violin plot for each column of *dataset* or each vector in
74607402
sequence *dataset*. Each filled area extends to represent the
@@ -7553,11 +7495,6 @@ def violin(self, vpstats, positions=None, vert=True, widths=0.5,
75537495
showmeans=False, showextrema=True, showmedians=False):
75547496
"""Drawing function for violin plots.
75557497
7556-
Call signature::
7557-
7558-
violin(vpstats, positions=None, vert=True, widths=0.5,
7559-
showmeans=False, showextrema=True, showmedians=False):
7560-
75617498
Draw a violin plot for each column of `vpstats`. Each filled area
75627499
extends to represent the entire data range, with optional lines at the
75637500
mean, the median, the minimum, and the maximum.

lib/matplotlib/axes/_base.py

Lines changed: 17 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,11 +1189,8 @@ def ishold(self):
11891189
return self._hold
11901190

11911191
def hold(self, b=None):
1192-
"""Set the hold state
1193-
1194-
Call signature::
1195-
1196-
hold(b=None)
1192+
"""
1193+
Set the hold state
11971194
11981195
If *hold* is *None* (default), toggle the *hold* state. Else
11991196
set the *hold* state to boolean value *b*.
@@ -2454,10 +2451,6 @@ def grid(self, b=None, which='major', axis='both', **kwargs):
24542451
"""
24552452
Turn the axes grids on or off.
24562453
2457-
Call signature::
2458-
2459-
grid(self, b=None, which='major', axis='both', **kwargs)
2460-
24612454
Set the axes grids on or off; *b* is a boolean. (For MATLAB
24622455
compatibility, *b* may also be a string, 'on' or 'off'.)
24632456
@@ -2788,12 +2781,7 @@ def get_xlim(self):
27882781
return tuple(self.viewLim.intervalx)
27892782

27902783
def set_xlim(self, left=None, right=None, emit=True, auto=False, **kw):
2791-
"""Set the data limits for the xaxis
2792-
2793-
Call signature::
2794-
2795-
set_xlim(self, *args, **kwargs):
2796-
2784+
"""
27972785
Set the data limits for the xaxis
27982786
27992787
Examples::
@@ -2887,11 +2875,8 @@ def get_xscale(self):
28872875

28882876
@docstring.dedent_interpd
28892877
def set_xscale(self, value, **kwargs):
2890-
"""Set the x-axis scale
2891-
2892-
Call signature::
2893-
2894-
set_xscale(value)
2878+
"""
2879+
Set the x-axis scale
28952880
28962881
Set the scaling of the x-axis: %(scale)s
28972882
@@ -2970,14 +2955,10 @@ def get_xticklabels(self, minor=False, which=None):
29702955

29712956
@docstring.dedent_interpd
29722957
def set_xticklabels(self, labels, fontdict=None, minor=False, **kwargs):
2973-
"""Set the xtick labels with list of strings *labels*
2974-
2975-
Call signature::
2976-
2977-
set_xticklabels(labels, fontdict=None, minor=False, **kwargs)
2958+
"""
2959+
Set the xtick labels with list of strings *labels*
29782960
2979-
Return a
2980-
list of axis text instances.
2961+
Return a list of axis text instances.
29812962
29822963
*kwargs* set the :class:`~matplotlib.text.Text` properties.
29832964
Valid properties are
@@ -3049,11 +3030,8 @@ def get_ylim(self):
30493030
return tuple(self.viewLim.intervaly)
30503031

30513032
def set_ylim(self, bottom=None, top=None, emit=True, auto=False, **kw):
3052-
"""Set the data limits for the yaxis
3053-
3054-
Call signature::
3055-
3056-
set_ylim(self, *args, **kwargs):
3033+
"""
3034+
Set the data limits for the yaxis
30573035
30583036
Examples::
30593037
@@ -3149,10 +3127,6 @@ def get_yscale(self):
31493127
def set_yscale(self, value, **kwargs):
31503128
"""Set the y-axis scale
31513129
3152-
Call signature::
3153-
3154-
set_yscale(value)
3155-
31563130
Set the scaling of the y-axis: %(scale)s
31573131
31583132
ACCEPTS: [%(scale)s]
@@ -3233,14 +3207,10 @@ def get_yticklabels(self, minor=False, which=None):
32333207

32343208
@docstring.dedent_interpd
32353209
def set_yticklabels(self, labels, fontdict=None, minor=False, **kwargs):
3236-
"""Set the y tick labels with list of strings *labels*
3237-
3238-
Call signature::
3239-
3240-
set_yticklabels(labels, fontdict=None, minor=False, **kwargs)
3210+
"""
3211+
Set the y tick labels with list of strings *labels*
32413212
3242-
Return a list of
3243-
:class:`~matplotlib.text.Text` instances.
3213+
Return a list of :class:`~matplotlib.text.Text` instances.
32443214
32453215
*kwargs* set :class:`~matplotlib.text.Text` properties for the labels.
32463216
Valid properties are
@@ -3781,11 +3751,8 @@ def _make_twin_axes(self, *kl, **kwargs):
37813751
return ax2
37823752

37833753
def twinx(self):
3784-
"""Create a twin Axes sharing the xaxis
3785-
3786-
Call signature::
3787-
3788-
ax = twinx()
3754+
"""
3755+
Create a twin Axes sharing the xaxis
37893756
37903757
create a twin of Axes for generating a plot with a sharex
37913758
x-axis but independent y axis. The y-axis of self will have
@@ -3807,11 +3774,8 @@ def twinx(self):
38073774
return ax2
38083775

38093776
def twiny(self):
3810-
"""Create a twin Axes sharing the yaxis
3811-
3812-
Call signature::
3813-
3814-
ax = twiny()
3777+
"""
3778+
Create a twin Axes sharing the yaxis
38153779
38163780
create a twin of Axes for generating a plot with a shared
38173781
y-axis but independent x axis. The x-axis of self will have

lib/matplotlib/backend_bases.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,10 +2429,6 @@ def start_event_loop_default(self, timeout=0):
24292429
functions for each of the GUI backends can be written. As
24302430
such, it throws a deprecated warning.
24312431
2432-
Call signature::
2433-
2434-
start_event_loop_default(self,timeout=0)
2435-
24362432
This call blocks until a callback function triggers
24372433
stop_event_loop() or *timeout* is reached. If *timeout* is
24382434
<=0, never timeout.
@@ -2457,9 +2453,6 @@ def stop_event_loop_default(self):
24572453
loop so that interactive functions, such as ginput and
24582454
waitforbuttonpress, can wait for events.
24592455
2460-
Call signature::
2461-
2462-
stop_event_loop_default(self)
24632456
"""
24642457
self._looping = False
24652458

0 commit comments

Comments
 (0)