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