# Create a histogram of any one of the four featuresimport matplotlib.pyplot as pltax = plt.axes()ax.hist(data.petal_length, bins=25);ax.set(xlabel='Petal Length (cm)', ylabel='Frequency', title='Distribution of Petal Lengths');plt.show()import matplotlib.pyplot as pltax = data.petal_length.plot.hist(bins=20)ax.set(xlabel='Petal Length (cm)', ylabel='Frequency', title='Distribution of Petal Lengths');plt.show()import matplotlib.pyplot as pltdata["petal_length"].hist(bins=25)plt.title("Distribution of Petal Lengths")plt.xlabel("Petal Length (cm)")plt.ylabel("Frequency")plt.show()# Create a single plot with histograms for each feature overlayed# If Seaborn is not importedtry: import seaborn as snsexcept: print('Seaborn must be installed for this course. Execute the following:') print('`conda install seaborn`') print('from a terminal and restart the kernel.')sns.set_context('notebook')import matplotlib.pyplot as pltax = data.plot.hist(bins=25, alpha=0.5)ax.set_xlabel('Size (cm)');plt.show()import matplotlib.pyplot as pltdata.plot(kind="hist", rot=50, bins=25, alpha=0.5)plt.show()# To create four separate plotsimport matplotlib.pyplot as pltaxList = data.hist(bins=25)for ax in axList.flatten(): if ax.is_last_row(): ax.set_xlabel('Size (cm)') if ax.is_first_col(): ax.set_ylabel('Frequency')#plt.show()