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

Skip to content

Commit b37ee96

Browse files
committed
Small fixes
1 parent 94b3b91 commit b37ee96

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/units.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ def _accepts_units(convert_x=[], convert_y=[]):
5858
unit information, are converted, and then handed on to the decorated
5959
function.
6060
61+
The first argument of the decorated function must be an Axes.
62+
6163
Parameters
6264
----------
6365
convert_x, convert_y : list
@@ -73,8 +75,7 @@ def wrapper(*args, **kwargs):
7375
# Get the original arguments - these will be modified later
7476
arguments = bound_args.arguments
7577
# Check for data kwarg
76-
has_data = (('data' in arguments) and
77-
(arguments['data'] is not None))
78+
has_data = arguments.get('data') is not None
7879
if has_data:
7980
data = arguments['data']
8081

0 commit comments

Comments
 (0)