8000 Use a setter for linestyle to handle the dash properties. · matplotlib/matplotlib@7f93d61 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7f93d61

Browse files
committed
Use a setter for linestyle to handle the dash properties.
1 parent 7a563e6 commit 7f93d61

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/patches.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,15 @@ def update_from(self, other):
193193
Updates this :class:`Patch` from the properties of *other*.
194194
"""
195195
artist.Artist.update_from(self, other)
196+
# For some properties we don't need or don't want to go through the
197+
# getters/setters, so we just copy them directly.
196198
self._edgecolor = other._edgecolor
197199
self._facecolor = other._facecolor
198200
self._fill = other._fill
199201
self._hatch = other._hatch
200202
self._linewidth = other._linewidth
201-
self._linestyle = other._linestyle
203+
# Use setters, getters where we need the extra work they do.
204+
self.set_linestyle(other._linestyle) # also sets dash properties
202205
self.set_transform(other.get_data_transform())
203206

204207
def get_extents(self):

0 commit comments

Comments
 (0)
0