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

Skip to content

Commit 50af626

Browse files
committed
Edited docstring as suggested
1 parent c982755 commit 50af626

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,26 +1288,24 @@ def apply_aspect(self, position=None):
12881288
def axis(self, *v, **kwargs):
12891289
"""Set axis properties.
12901290
1291-
If no positional or kwargs are given, returns the current
1292-
axes limits are returned with no side effects.
1291+
Valid signatures::
12931292
1294-
If a positional argument is passed the keyword arguments are ignored.
1295-
1296-
If no positional argument is passed, the keyword arguments are used.
1293+
xmin, xmax, ymin, ymax = axis()
1294+
xmin, xmax, ymin, ymax = axis(list_arg)
1295+
xmin, xmax, ymin, ymax = axis(string_arg)
1296+
xmin, xmax, ymin, ymax = axis(**kwargs)
12971297
12981298
Parameters
12991299
----------
13001300
v : list of float or {'on', 'off', 'equal', 'tight', 'scaled',\
1301-
'normal', 'auto', 'image', 'square'}
1301+
'normal', 'auto', 'image', 'square'}
13021302
Optional positional argument
13031303
1304-
Value to set the axis settings to.
1305-
If a list it is interpreted as [xmin, xmax, ymin, ymax].
1306-
If a string
1304+
Axis data limits set from a list; or a command relating to axes:
13071305
1308-
========== ===============================================
1306+
========== ================================================
13091307
Value Description
1310-
========== ===============================================
1308+
========== ================================================
13111309
'on' Toggle axis lines and labels on
13121310
'off' Toggle axis lines and labels off
13131311
'equal' Equal scaling by changing limits
@@ -1316,8 +1314,9 @@ def axis(self, *v, **kwargs):
13161314
'auto' Automatic scaling, fill rectangle with data
13171315
'normal' Same as 'auto'; deprecated
13181316
'image' 'scaled' with axis limits equal to data limits
1319-
'square' Square plot; both axis have equal limit range
1320-
========== ===============================================
1317+
'square' Square plot; similar to 'scaled', but initially\
1318+
forcing xmax-xmin = ymax-ymin
1319+
========== ================================================
13211320
13221321
emit : bool, optional
13231322
Passed to set_{x,y}lim functions, if observers

0 commit comments

Comments
 (0)