python - How to change the linewidth of hatch in matplotlib? -


is there way increase width of hatch in matplotlib?

for example, following code specifying linewidth changes width of edge. want change linewidth of line used hatch.

import matplotlib.pyplot plt import numpy np  x = np.random.randn(100)  fig = plt.figure() ax = fig.add_subplot(111) ax.hist(x, fill=false, hatch='/', linewidth=2)  plt.show() 

as of matplotlib version 2.0, can directly change linewidth parameter, follows:

import matplotlib mpl mpl.rcparams['hatch.linewidth'] = 0.1  # previous pdf hatch linewidth mpl.rcparams['hatch.linewidth'] = 1.0  # previous svg hatch linewidth 

this seems better workaround folks have above. can check matplotlib version by:

import matplotlib mpl print(mpl.__version__) # should 2.x.y 

Popular posts from this blog