Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
I am trying to create a contour plot with the contours filled with hatches and no color. The following example works if I save it to .png but when I save it to .pdf the output is just the axis.
importnumpyasnpimportmatplotlib.pyplotaspltdelta=0.025x=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='AGH',hatches=['\\'])plt.tight_layout()plt.savefig('GitHub.pdf')plt.show()
I am using Matplotlib2.00 in Linux, installed from source.
Metadata
Metadata
Assignees
Labels
No labels