Write a code in Python to show a histogram distribution of data.
[2, 3, 5, 6, 7, 8, 9, 10]
import matplotlib.pyplot as plt

# example data
data = [2, 3, 5, 6, 7, 8, 9, 10]

# create histogram
plt.hist(data)

# show plot
plt.show()