MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / xlim

Function xlim

site-packages/matplotlib/pyplot.py:1409–1443  ·  view source on GitHub ↗

Get or set the x limits of the current axes. Call signatures:: left, right = xlim() # return the current xlim xlim((left, right)) # set the xlim to left, right xlim(left, right) # set the xlim to left, right If you do not specify args, you can pass *lef

(*args, **kwargs)

Source from the content-addressed store, hash-verified

1407
1408
1409def xlim(*args, **kwargs):
1410 """
1411 Get or set the x limits of the current axes.
1412
1413 Call signatures::
1414
1415 left, right = xlim() # return the current xlim
1416 xlim((left, right)) # set the xlim to left, right
1417 xlim(left, right) # set the xlim to left, right
1418
1419 If you do not specify args, you can pass *left* or *right* as kwargs,
1420 i.e.::
1421
1422 xlim(right=3) # adjust the right leaving left unchanged
1423 xlim(left=1) # adjust the left leaving right unchanged
1424
1425 Setting limits turns autoscaling off for the x-axis.
1426
1427 Returns
1428 -------
1429 left, right
1430 A tuple of the new x-axis limits.
1431
1432 Notes
1433 -----
1434 Calling this function with no arguments (e.g. ``xlim()``) is the pyplot
1435 equivalent of calling `~.Axes.get_xlim` on the current axes.
1436 Calling this function with arguments is the pyplot equivalent of calling
1437 `~.Axes.set_xlim` on the current axes. All arguments are passed though.
1438 """
1439 ax = gca()
1440 if not args and not kwargs:
1441 return ax.get_xlim()
1442 ret = ax.set_xlim(*args, **kwargs)
1443 return ret
1444
1445
1446def ylim(*args, **kwargs):

Callers

nothing calls this directly

Calls 3

gcaFunction · 0.85
get_xlimMethod · 0.80
set_xlimMethod · 0.45

Tested by

no test coverage detected