@@ -732,9 +732,6 @@ def newPage(self, width, height):
732
732
'Resources' : self .resourceObject ,
733
733
'MediaBox' : [0 , 0 , 72 * width , 72 * height ],
734
734
'Contents' : contentObject ,
735
- 'Group' : {'Type' : Name ('Group' ),
736
- 'S' : Name ('Transparency' ),
737
- 'CS' : Name ('DeviceRGB' )},
738
735
'Annots' : annotsObject ,
739
736
}
740
737
pageObject = self .reserveObject ('page' )
@@ -744,8 +741,10 @@ def newPage(self, width, height):
744
741
745
742
self .beginStream (contentObject .id ,
746
743
self .reserveObject ('length of content stream' ))
747
- # Initialize the pdf graphics state to match the default mpl
748
- # graphics context: currently only the join style needs to be set
744
+ # Initialize the pdf graphics state to match the default Matplotlib
745
+ # graphics context (colorspace and joinstyle).
746
+ self .output (Name ('DeviceRGB' ), Op .setcolorspace_stroke )
747
+ self .output (Name ('DeviceRGB' ), Op .setcolorspace_nonstroke )
749
748
self .output (GraphicsContextPdf .joinstyles ['round' ], Op .setlinejoin )
750
749
751
750
# Clear the list of annotations for the next page
0 commit comments