In the code, you linked, there are the following lines:
m.drawparallels(np.arange(y1,y2,2.),labels=[1,0,0,0],color='black',dashes=[1,0],labelstyle='+/-',linewidth=0.2) # draw parallels
m.drawmeridians(np.arange(x1,x2,2.),labels=[0,0,0,1],color='black',dashes=[1,0],labelstyle='+/-',linewidth=0.2)
In those lines the argument dashes
is set to [1,0]
. Concerning to your error message, all values in the array dashes
must be strictly positive. That's why you get the exception (your array dashes
contains zero).