Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created May 18, 2021 08:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/b1738a98111af85214f21c95b3aa8f74 to your computer and use it in GitHub Desktop.
Save amankharwal/b1738a98111af85214f21c95b3aa8f74 to your computer and use it in GitHub Desktop.
# 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