Answers for "controlliing a fill pattern in matplotlib"

0

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()
Posted by: Guest on June-18-2020

Python Answers by Framework

Browse Popular Code Answers by Language