I am attempting to use the hatching feature in matplotlib, which works fine when displaying to screen. However when I save the figure to pdf format, the hatch marks are not rendered:
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0,2*np.pi,100)
plt.figure()
plt.fill(x,np.sin(x),color='blue',alpha=0.5,hatch='/')
plt.show()
plt.savefig('./test.pdf',format='pdf')
I am using matplotlib 1.0.1 in pylab on OS X 10.6.6. This may be a platform specific issue having to do with the backend renderer, but I'm not sure. Any suggestions would be most appreciated.