Introduction to Python for Finance
Adina Howe
Professor

import matplotlib.pyplot as plt
plt.hist(x=prices, bins=3)
plt.show()

import matplotlib.pyplot as plt
plt.hist(prices, bins=6)
plt.show()

import matplotlib.pyplot as plt
plt.hist(prices, bins=6, density=True)
plt.show()

import matplotlib.pyplot as plt
plt.hist(x=prices, bins=6, density=True)
plt.hist(x=prices_new, bins=6, density=True)
plt.show()

import matplotlib.pyplot as plt
plt.hist(x=prices, bins=6, density=True, alpha=0.5)
plt.hist(x=prices_new, bins=6, density=True, alpha=0.5)
plt.show()

import matplotlib.pyplot as plt
plt.hist(x=prices, bins=6, density=True, alpha=0.5, label="Prices 1")
plt.hist(x=prices_new, bins=6, density=True, alpha=0.5, label="Prices New")
plt.legend()
plt.show()

Introduction to Python for Finance