plot histogram in seaborn
sns.distplot(gapminder['lifeExp'], kde=False, color='red', bins=100)
plt.title('Life Expectancy', fontsize=18)
plt.xlabel('Life Exp (years)', fontsize=16)
plt.ylabel('Frequency', fontsize=16)
plot histogram in seaborn
sns.distplot(gapminder['lifeExp'], kde=False, color='red', bins=100)
plt.title('Life Expectancy', fontsize=18)
plt.xlabel('Life Exp (years)', fontsize=16)
plt.ylabel('Frequency', fontsize=16)
sns datetime histogram
import datetime
import seaborn as sns
import matplotlib.pyplot as plt
# Generate dates -- change by your actual dates!
dates = [datetime.datetime.fromordinal(int(d)) for d in (43 * np.random.randn(200) + 737555)]
# Go back to ordinal numbers...
ordinal_dates = np.array([d.toordinal() for d in dates])
sns.distplot(ordinal_dates, kde=True)
# Now, get the positions of the xticks
ticks_locations, _ = plt.xticks();
# Get the labels for those positions
labels = [datetime.datetime.fromordinal(int(t)).date() for t in ticks_locations]
plt.xticks(ticks_locations, labels, rotation=90)
plt.title("Date distribution");
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us