Hatches filling an empty color contour not saved in pdf python matplotlib -
i trying create contour plot contours filled hatches , no color. following example works if save .png when save .pdf output axis.
a code showing mean:
import numpy np import matplotlib.pyplot plt    delta = 0.025  x = y = np.arange(-3.0, 3.01, delta)   x, y = np.meshgrid(x, y) z1 = plt.mlab.bivariate_normal(x, y, 1.0, 1.0, 0.0, 0.0) z2 = plt.mlab.bivariate_normal(x, y, 1.5, 0.5, 1, 1) z = 10 * (z1 - z2)   levels=[0,1] plt.contourf(x, y, z/x,                    levels,                   #alpha=0.5,                   colors='none', label='check',                    hatches=['\\'])  plt.tight_layout()     plt.savefig('check.pdf') plt.show()   i checked matplotlib fill_between() not save correctly pdf hatch , links within, no luck fixing problem!
 
 

Comments
Post a Comment