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

Skip to content

Commit 6b11910

Browse files
committed
Lots of minor changes to docs to reduce Sphinx warnings.
1 parent 2e6b713 commit 6b11910

8 files changed

Lines changed: 112 additions & 89 deletions

File tree

doc/users/legend_guide.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Let's consider the following sample code, ::
244244

245245
legend([p_1, p_2,..., p_i, ...], ["Test 1", "Test 2", ..., "Test i",...])
246246

247-
For each *p_i*, matplotlib
247+
For each *p_i*, matplotlib
248248

249249
1. check if *p_i* itself is in the handler_map
250250
2. if not, iterate over type(p_i).mro() until a matching key is found in the handler_map
@@ -279,8 +279,8 @@ In the above example, only *p1* will be handled by *my_handler*, while
279279
others will be handled by default handlers.
280280

281281
The curent default handler_map has handlers for errobar and bar
282-
plots. Also, it includes an entry for ¡°tuple¡± which is mapped to
283-
*HandlerTuple*. It simply overplots all the handles for items in the
282+
plots. Also, it includes an entry for `tuple` which is mapped to
283+
`HandlerTuple`. It simply overplots all the handles for items in the
284284
given tuple. For example,
285285

286286

lib/matplotlib/axes.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3861,14 +3861,14 @@ def plot_date(self, x, y, fmt='bo', tz=None, xdate=True, ydate=False,
38613861
38623862
.. seealso::
38633863
3864-
:mod:`~matplotlib.dates`
3865-
for helper functions
3864+
:mod:`~matplotlib.dates`
3865+
for helper functions
38663866
3867-
:func:`~matplotlib.dates.date2num`,
3868-
:func:`~matplotlib.dates.num2date` and
3869-
:func:`~matplotlib.dates.drange`
3870-
for help on creating the required floating point
3871-
dates.
3867+
:func:`~matplotlib.dates.date2num`,
3868+
:func:`~matplotlib.dates.num2date` and
3869+
:func:`~matplotlib.dates.drange`
3870+
for help on creating the required floating point
3871+
dates.
38723872
"""
38733873

38743874
if not self._hold: self.cla()
@@ -4210,14 +4210,14 @@ def _get_legend_handles(self, legend_handler_map=None):
42104210
if legend_handler_map is not None:
42114211
handler_map = handler_map.copy()
42124212
handler_map.update(legend_handler_map)
4213-
4213+
42144214
handles = []
42154215
for h in handles_original:
42164216
if h.get_label() == "_nolegend_": #.startswith('_'):
42174217
continue
42184218
if mlegend.Legend.get_legend_handler(handler_map, h):
42194219
handles.append(h)
4220-
4220+
42214221
return handles
42224222

42234223

@@ -5328,7 +5328,7 @@ def xywhere(xs, ys, mask):
53285328
has_yerr=(yerr is not None),
53295329
label=label)
53305330
self.containers.append(errorbar_container)
5331-
5331+
53325332
return errorbar_container # (l0, caplines, barcols)
53335333

53345334
def boxplot(self, x, notch=0, sym='b+', vert=1, whis=1.5,

lib/matplotlib/backend_bases.py

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -916,28 +916,42 @@ class TimerBase(object):
916916
event loops.
917917
918918
Mandatory functions that must be implemented:
919-
* _timer_start: Contains backend-specific code for starting the timer
920-
* _timer_stop: Contains backend-specific code for stopping the timer
919+
920+
* `_timer_start`: Contains backend-specific code for starting
921+
the timer
922+
923+
* `_timer_stop`: Contains backend-specific code for stopping
924+
the timer
921925
922926
Optional overrides:
923-
* _timer_set_single_shot: Code for setting the timer to single shot
924-
operating mode, if supported by the timer object. If not, the Timer
925-
class itself will store the flag and the _on_timer method should
926-
be overridden to support such behavior.
927-
* _timer_set_interval: Code for setting the interval on the timer, if
928-
there is a method for doing so on the timer object.
929-
* _on_timer: This is the internal function that any timer object should
930-
call, which will handle the task of running all callbacks that have
931-
been set.
927+
928+
* `_timer_set_single_shot`: Code for setting the timer to
929+
single shot operating mode, if supported by the timer
930+
object. If not, the `Timer` class itself will store the flag
931+
and the `_on_timer` method should be overridden to support
932+
such behavior.
933+
934+
* `_timer_set_interval`: Code for setting the interval on the
935+
timer, if there is a method for doing so on the timer
936+
object.
937+
938+
* `_on_timer`: This is the internal function that any timer
939+
object should call, which will handle the task of running
940+
all callbacks that have been set.
932941
933942
Attributes:
934-
* interval: The time between timer events in milliseconds. Default
935-
is 1000 ms.
936-
* single_shot: Boolean flag indicating whether this timer should
937-
operate as single shot (run once and then stop). Defaults to False.
938-
* callbacks: Stores list of (func, args) tuples that will be called
939-
upon timer events. This list can be manipulated directly, or the
940-
functions add_callback and remove_callback can be used.
943+
944+
* `interval`: The time between timer events in
945+
milliseconds. Default is 1000 ms.
946+
947+
* `single_shot`: Boolean flag indicating whether this timer
948+
should operate as single shot (run once and then
949+
stop). Defaults to `False`.
950+
951+
* `callbacks`: Stores list of (func, args) tuples that will be
952+
called upon timer events. This list can be manipulated
953+
directly, or the functions `add_callback` and
954+
`remove_callback` can be used.
941955
'''
942956
def __init__(self, interval=None, callbacks=None):
943957
#Initialize empty callbacks list and setup default settings if necssary

lib/matplotlib/collections.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -956,14 +956,15 @@ def __init__(self, widths, heights, angles, units='points', **kwargs):
956956
angles of first axes, degrees CCW from the X-axis
957957
958958
*units*: ['points' | 'inches' | 'dots' | 'width' | 'height'
959-
| 'x' | 'y' | 'xy']
960-
units in which majors and minors are given; 'width' and 'height'
961-
refer to the dimensions of the axes, while 'x' and 'y'
962-
refer to the *offsets* data units. 'xy' differs from all
963-
others in that the angle as plotted varies with the
964-
aspect ratio, and equals the specified angle only when
965-
the aspect ratio is unity. Hence it behaves the same
966-
as the :class:`~matplotlib.patches.Ellipse` with
959+
| 'x' | 'y' | 'xy']
960+
961+
units in which majors and minors are given; 'width' and
962+
'height' refer to the dimensions of the axes, while 'x'
963+
and 'y' refer to the *offsets* data units. 'xy' differs
964+
from all others in that the angle as plotted varies with
965+
the aspect ratio, and equals the specified angle only when
966+
the aspect ratio is unity. Hence it behaves the same as
967+
the :class:`~matplotlib.patches.Ellipse` with
967968
axes.transData as its transform.
968969
969970
Additional kwargs inherited from the base :class:`Collection`:

lib/matplotlib/lines.py

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -759,44 +759,44 @@ def set_marker(self, marker):
759759
"""
760760
Set the line marker
761761
762-
========== ==========================
763-
marker description
764-
========== ==========================
765-
``'.'`` point
766-
``','`` pixel
767-
``'o'`` circle
768-
``'v'`` triangle_down
769-
``'^'`` triangle_up
770-
``'<'`` triangle_left
771-
``'>'`` triangle_right
772-
``'1'`` tri_down
773-
``'2'`` tri_up
774-
``'3'`` tri_left
775-
``'4'`` tri_right
776-
``'s'`` square
777-
``'p'`` pentagon
778-
``'*'`` star
779-
``'h'`` hexagon1
780-
``'H'`` hexagon2
781-
``'+'`` plus
782-
``'x'`` x
783-
``'D'`` diamond
784-
``'d'`` thin_diamond
785-
``'|'`` vline
786-
``'_'`` hline
787-
TICKLEFT tickleft
788-
TICKRIGHT tickright
789-
TICKUP tickup
790-
TICKDOWN tickdown
791-
CARETLEFT caretleft
792-
CARETRIGHT caretright
793-
CARETUP caretup
794-
CARETDOWN caretdown
795-
``'None'`` nothing
796-
``' '`` nothing
797-
``''`` nothing
798-
'$...$' render the string using mathtext
799-
========== ==========================
762+
=========== ===================================
763+
marker description
764+
=========== ===================================
765+
``'.'`` point
766+
``','`` pixel
767+
``'o'`` circle
768+
``'v'`` triangle_down
769+
``'^'`` triangle_up
770+
``'<'`` triangle_left
771+
``'>'`` triangle_right
772+
``'1'`` tri_down
773+
``'2'`` tri_up
774+
``'3'`` tri_left
775+
``'4'`` tri_right
776+
``'s'`` square
777+
``'p'`` pentagon
778+
``'*'`` star
779+
``'h'`` hexagon1
780+
``'H'`` hexagon2
781+
``'+'`` plus
782+
``'x'`` x
783+
``'D'`` diamond
784+
``'d'`` thin_diamond
785+
``'|'`` vline
786+
``'_'`` hline
787+
TICKLEFT tickleft
788+
TICKRIGHT tickright
789+
TICKUP tickup
790+
TICKDOWN tickdown
791+
CARETLEFT caretleft
792+
CARETRIGHT caretright
793+
CARETUP caretup
794+
CARETDOWN caretdown
795+
``'None'`` nothing
796+
``' '`` nothing
797+
``''`` nothing
798+
``'$...$'`` render the string using mathtext
799+
=========== ===================================
800800
801801
802802
@@ -808,7 +808,7 @@ def set_marker(self, marker):
808808
| ``'x'`` | ``'|'``
809809
| TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT
810810
| CARETUP | CARETDOWN | CARETLEFT | CARETRIGHT
811-
| ``'None'`` | ``' '`` | ``''`` | '$...$']
811+
| ``'None'`` | ``' '`` | ``''`` | ``'$...$'`` ]
812812
813813
"""
814814
if marker in self._markers:

lib/matplotlib/patches.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,7 +2137,7 @@ def set_boxstyle(self, boxstyle=None, **kw):
21372137
Without argument (or with *boxstyle* = None), it returns
21382138
available box styles.
21392139
2140-
ACCEPTS: [ %(AvailableBoxstyles)s ]
2140+
ACCEPTS: %(AvailableBoxstyles)s
21412141
21422142
"""
21432143

@@ -3816,7 +3816,7 @@ def get_path(self):
38163816
"""
38173817
return the path of the arrow in the data coordinate. Use
38183818
get_path_in_displaycoord() method to retrieve the arrow path
3819-
in the disaply coord.
3819+
in the display coord.
38203820
"""
38213821
_path, fillable = self.get_path_in_displaycoord()
38223822

lib/matplotlib/pyplot.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -694,13 +694,17 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
694694
the first column of plots will have visible set to False
695695
696696
squeeze : bool
697-
698697
If True, extra dimensions are squeezed out from the returned axis object:
699-
- if only one subplot is constructed (nrows=ncols=1), the resulting
700-
single Axis object is returned as a scalar.
701-
- for Nx1 or 1xN subplots, the returned object is a 1-d numpy object
702-
array of Axis objects are returned as numpy 1-d arrays.
703-
- for NxM subplots with N>1 and M>1 are returned as a 2d array.
698+
699+
- if only one subplot is constructed (nrows=ncols=1), the
700+
resulting single Axis object is returned as a scalar.
701+
702+
- for Nx1 or 1xN subplots, the returned object is a 1-d numpy
703+
object array of Axis objects are returned as numpy 1-d
704+
arrays.
705+
706+
- for NxM subplots with N>1 and M>1 are returned as a 2d
707+
array.
704708
705709
If False, no squeezing at all is done: the returned axis object is always
706710
a 2-d array contaning Axis instances, even if it ends up being 1x1.
@@ -716,10 +720,13 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
716720
Returns:
717721
718722
fig, ax : tuple
723+
719724
- fig is the Matplotlib Figure object
720-
- ax can be either a single axis object or an array of axis objects if
721-
more than one supblot was created. The dimensions of the resulting array
722-
can be controlled with the squeeze keyword, see above.
725+
726+
- ax can be either a single axis object or an array of axis
727+
objects if more than one supblot was created. The dimensions
728+
of the resulting array can be controlled with the squeeze
729+
keyword, see above.
723730
724731
**Examples:**
725732

lib/matplotlib/transforms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,6 +1506,7 @@ def get_matrix(self):
15061506
a c e
15071507
b d f
15081508
0 0 1
1509+
15091510
"""
15101511
self._invalid = 0
15111512
return self._mtx

0 commit comments

Comments
 (0)