I am running into the following issue when trying to save a matplotlib fill_between() plot as a pdf in ipython.
import matplotlib.pyplot as plt
A =[1,2,3,4,5,6]
B = [10,20,30,40,50,60]
plt.fill_between(A,A,B,color="none", hatch="\\\\\\\\\\\\", edgecolor="grey", linewidth=0.0,alpha=1)
plt.savefig('test.pdf')
when I run this, I find the following plot in the ipython notebook:
However, when I open the saved file, it instead looks like this:
The hatches are barely visible. I need a high-quality plot, which is why I am trying to save as a pdf instead of as a png, for example. Is there a way to increase the linewidth of the hatches when saving the pdf?