October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following code block creates five charts that represent a tie, with different colors and patterns printed on them:
# Set up the datax = np.array([0.2, 0.4, 0.6, 0.8, 0.5])y = [1, 6, 6, 1, 0]# Plot a tie graph 5 times with different colors and hatchesplt.fill(x+1, y, color='g', hatch='+*')plt.fill(x+2, y, color='b', hatch='-o')plt.fill(x+3, y, color='y', hatch='+x')plt.fill(x+4, y, color='r', hatch='\\')plt.fill(x+5, y, color='m', hatch='Ox')plt.title('Hatch Demo')plt.show()
Read now
Unlock full access