Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

controlliing a fill pattern in matplotlib

import pandas as pd 
import numpy as np

n = 8
a = np.random.random(n)
b = np.random.random(n)
x = np.arange(n)

plt.bar(x,a, color='w', hatch='x')
plt.bar(x,a+b, bottom = a, color = 'w', hatch = '/')
plt.show()
 
PREVIOUS NEXT
Tagged: #controlliing #fill #pattern #matplotlib
ADD COMMENT
Topic
Name
8+6 =