Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Histogram and Density Plots
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
data = np.random.multivariate_normal([0, 0], [[5, 2], [2, 2]], size=2000)
data = pd.DataFrame(data, columns=['x', 'y'])
sns.distplot(data['x'])
sns.distplot(data['y'])
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment