From 6b5aa597370c8a5edcd54efbcf3fe4b5d6bac769 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Tue, 1 Nov 2022 12:51:25 +0100 Subject: [PATCH] Backport PR #24282: Fix some minor docstring typos --- lib/matplotlib/cbook/__init__.py | 8 ++++---- lib/matplotlib/widgets.py | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/matplotlib/cbook/__init__.py b/lib/matplotlib/cbook/__init__.py index 171c7a6fff1f..abb6c6df4fab 100644 --- a/lib/matplotlib/cbook/__init__.py +++ b/lib/matplotlib/cbook/__init__.py @@ -132,9 +132,9 @@ class CallbackRegistry: for a set of signals and callbacks: >>> def oneat(x): - ... print('eat', x) + ... print('eat', x) >>> def ondrink(x): - ... print('drink', x) + ... print('drink', x) >>> from matplotlib.cbook import CallbackRegistry >>> callbacks = CallbackRegistry() @@ -1905,7 +1905,7 @@ def _array_perimeter(arr): Examples -------- - >>> i, j = np.ogrid[:3,:4] + >>> i, j = np.ogrid[:3, :4] >>> a = i*10 + j >>> a array([[ 0, 1, 2, 3], @@ -1949,7 +1949,7 @@ def _unfold(arr, axis, size, step): Examples -------- - >>> i, j = np.ogrid[:3,:7] + >>> i, j = np.ogrid[:3, :7] >>> a = i*10 + j >>> a array([[ 0, 1, 2, 3, 4, 5, 6], diff --git a/lib/matplotlib/widgets.py b/lib/matplotlib/widgets.py index c42caa649935..004ceea2a733 100644 --- a/lib/matplotlib/widgets.py +++ b/lib/matplotlib/widgets.py @@ -2918,10 +2918,9 @@ class RectangleSelector(_SelectorWidget): ... print(erelease.xdata, erelease.ydata) >>> props = dict(facecolor='blue', alpha=0.5) >>> rect = mwidgets.RectangleSelector(ax, onselect, interactive=True, - props=props) + ... props=props) >>> fig.show() - - >>> selector.add_state('square') + >>> rect.add_state('square') See also: :doc:`/gallery/widgets/rectangle_selector` """ pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy