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

Skip to content

Commit 740ffbf

Browse files
committed
added comment
1 parent 88e40cb commit 740ffbf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,12 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
228228
offsetTrans, facecolors, edgecolors, linewidths, linestyles,
229229
antialiaseds, urls, offset_position):
230230
path, transform = path_id
231+
# Only apply another translation if we have an offset, else we
232+
# resuse the inital transform.
231233
if xo != 0 or yo != 0:
234+
# The transformation can be used by multiple paths. Since
235+
# translate is a inplace operation, we need to copy the
236+
# transformation by .frozen() before applying the translation.
232237
transform = transform.frozen()
233238
transform.translate(xo, yo)
234239
self.draw_path(gc0, path, transform, rgbFace)

0 commit comments

Comments
 (0)