8000 Suggested changes to ginput docstring · matplotlib/matplotlib@922ef5f · GitHub
[go: up one dir, main page]

Skip to content

Commit 922ef5f

Browse files
committed
Suggested changes to ginput docstring
1 parent bc019ea commit 922ef5f

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

lib/matplotlib/figure.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,9 +1827,9 @@ def subplots_adjust(self, *args, **kwargs):
18271827
def ginput(self, n=1, timeout=30, show_clicks=True, mouse_add=1,
18281828
mouse_pop=3, mouse_stop=2):
18291829
"""
1830-
Blocking call to interact with a figure. This will wait for *n*
1831-
clicks from the user and return a list of the coordinates of each
1832-
click.
1830+
Blocking call to interact with a figure. Wait until the user clicks *n*
1831+
times on the figure, and return the coordinates of each click in a
1832+
list.
18331833
18341834
The buttons used for the various actions (adding points, removing
18351835
points, terminating the inputs) can be overriden via the
@@ -1839,22 +1839,20 @@ def ginput(self, n=1, timeout=30, show_clicks=True, mouse_add=1,
18391839
18401840
Parameters
18411841
----------
1842-
n : int, optional
1842+
n : int, optional, default: 1
18431843
Number of mouse clicks to accumulate. If negative, accumulate
1844-
clicks until the input is terminated manually. Default is 1.
1845-
timeout : scalar, optional
1844+
clicks until the input is terminated manually.
1845+
timeout : scalar, optional, default: 30
18461846
Number of seconds to wait before timing out. If zero or negative
1847-
will never timeout. Default is 30.
1848-
show_clicks : bool, optional
1849-
If True, show a red cross at the location of each click. Default is
1850-
False.
1851-
mouse_add : int, one of (1, 2, 3), optional
1852-
Mouse button used to add points. Default is 1 (left click)
1853-
mouse_pop : int, one of (1, 2, 3), optional
1854-
Mouse button used to remove the most recently added point. Default
1855-
is 3 (right click)
1856-
mouse_stop : int, one of (1, 2, 3), optional
1857-
Mouse button used to stop input. Default is 2 (middle click)
1847+
will never timeout.
1848+
show_clicks : bool, optional, default: False
1849+
If True, show a red cross at the location of each click
1850+
mouse_add : int, one of (1, 2, 3), optional, default: 1 (left click)
1851+
Mouse button used to add points
1852+
mouse_pop : int, one of (1, 2, 3), optional, default: 3 (right click)
1853+
Mouse button used to remove the most recently added point
1854+
mouse_stop : int, one of (1, 2, 3), optional, default: 2 (middle click)
1855+
Mouse button used to stop input
18581856
18591857
Returns
18601858
-------

0 commit comments

Comments
 (0)
0