Skip to content

Commit 85a6ccf

Browse files
committed
Merge pull request #1450 from mdboom/fix_pdf_path_collection_state2
Colorbar edges are different in PDF backend
2 parents 74c656e + 0d7d252 commit 85a6ccf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/backends/backend_pdf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
15341534
path_codes.append(name)
15351535

15361536
output = self.file.output
1537-
output(Op.gsave)
1537+
output(*self.gc.push())
15381538
lastx, lasty = 0, 0
15391539
for xo, yo, path_id, gc0, rgbFace in self._iter_collection(
15401540
gc, master_transform, all_transforms, path_codes, offsets,
@@ -1545,7 +1545,7 @@ def draw_path_collection(self, gc, master_transform, paths, all_transforms,
15451545
dx, dy = xo - lastx, yo - lasty
15461546
output(1, 0, 0, 1, dx, dy, Op.concat_matrix, path_id, Op.use_xobject)
15471547
lastx, lasty = xo, yo
1548-
output(Op.grestore)
1548+
output(*self.gc.pop())
15491549

15501550
def draw_markers(self, gc, marker_path, marker_trans, path, trans, rgbFace=None):
15511551
# For simple paths or small numbers of markers, don't bother

0 commit comments

Comments
 (0)