Closed
Description
Bug report
Bug summary
I have a pcolormesh that has shading='gouraud', and I am trying to save it to an .eps. Saving it to a pdf works fine, but trying to save to an eps gives an error.
Code for reproduction
import matplotlib.pyplot as plt
import numpy as np
plt.pcolormesh(np.random.randn(10,10), shading='gouraud')
plt.gcf().savefig('test.eps')
Actual outcome
168 def quote_ps_string(s):
169 "Quote dangerous characters of S for use in a PostScript string constant."
--> 170 s=s.replace("\\", "\\\\")
171 s=s.replace("(", "\\(")
172 s=s.replace(")", "\\)")
TypeError: a bytes-like object is required, not 'str'
Matplotlib version
matplotlib 1.5.1
'3.5.1 |Anaconda 2.4.1 (x86_64)| (default, Dec 7 2015, 11:24:55) \n[GCC 4.2.1 (Apple Inc. build 5577)]'
OS X
I fixing this might just require adding a 'b' before these strings.