Created
March 23, 2018 16:24
-
-
Save WillKoehrsen/e17f446a0cbe42ff337437e81dcd51ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import the libraries | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
# matplotlib histogram | |
plt.hist(flights['arr_delay'], color = 'blue', edgecolor = 'black', | |
bins = int(180/5)) | |
# seaborn histogram | |
sns.distplot(flights['arr_delay'], hist=True, kde=False, | |
bins=int(180/5), color = 'blue', | |
hist_kws={'edgecolor':'black'}) | |
# Add labels | |
plt.title('Histogram of Arrival Delays') | |
plt.xlabel('Delay (min)') | |
plt.ylabel('Flights') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment