8000 BUG: in Patch.update_from, use private variables. Closes #7375. by efiring · Pull Request #7497 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

BUG: in Patch.update_from, use private variables. Closes #7375. #7497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions lib/matplotlib/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,16 @@ def update_from(self, other):
Updates this :class:`Patch` from the properties of *other*.
"""
artist.Artist.update_from(self, other)
self.set_edgecolor(other.get_edgecolor())
self.set_facecolor(other.get_facecolor())
self.set_fill(other.get_fill())
self.set_hatch(other.get_hatch())
self.set_linewidth(other.get_linewidth())
self.set_linestyle(other.get_linestyle())
# For some properties we don't need or don't want to go through the
# getters/setters, so we just copy them directly.
self._edgecolor = other._edgecolor
self._facecolor = other._facecolor
self._fill = other._fill
self._hatch = other._hatch
self._linewidth = other._linewidth
# Use setters, getters where we need the extra work they do.
self.set_linestyle(other._linestyle) # also sets dash properties
self.set_transform(other.get_data_transform())
self.set_alpha(other.get_alpha())

def get_extents(self):
"""
Expand Down
0