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

Skip to content

Commit bba3ae2

Browse files
committed
REV: do not sort by key in Artist.update
restore old behavior
1 parent c458cbc commit bba3ae2

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

doc/api/api_changes/2015-12-01-TAC.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ The methods `matplotlib.artist.Artist.set`,
66
now use a common codepath to look up how to update the given artist
77
properties (either using the setter methods or an attribute/property).
88

9-
The behavior of `matplotlib.Artist.update` is slightly changed to now
10-
sort by key name and returns a list of the returned values from the
11-
setter methods to avoid changing the API of
12-
`matplotlib.Artist.set` and `matplotlib.artist.setp`.
9+
The behavior of `matplotlib.Artist.update` is slightly changed to
10+
returna a list of the returned values from the setter methods to avoid
11+
changing the API of `matplotlib.Artist.set` and
12+
`matplotlib.artist.setp`.
1313

1414
The keys passed into `matplotlib.Artist.update` are now converted to
15-
all lower case before being processed, to match the behavior of
15+
lower case before being processed to match the behavior of
1616
`matplotlib.Artist.set` and `matplotlib.artist.setp`. This should not
1717
break any user code because there are no set methods with capitals in
18-
the names, however going forward this puts a constraint naming properties.
18+
the names, however going forward this puts a constraint naming
19+
properties.

lib/matplotlib/artist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ def _update_property(self, k, v):
872872
self.eventson = False
873873
try:
874874
ret = [_update_property(self, k, v)
875-
for k, v in sorted(props.items(), reverse=True)]
875+
for k, v in props.items()]
876876
finally:
877877
self.eventson = store
878878

0 commit comments

Comments
 (0)