Skip to content

Instantly share code, notes, and snippets.

@searope
Created June 25, 2019 15:42
Show Gist options
  • Select an option

  • Save searope/4127508683841b934215649bd2f3ed0c to your computer and use it in GitHub Desktop.

Select an option

Save searope/4127508683841b934215649bd2f3ed0c to your computer and use it in GitHub Desktop.
matplotlib.pyplot tips and tricks
import matplotlib.pyplot as plt
fig, (ax1, ax2, ax3) = plt.subplots(ncols=3, figsize=(9, 5))
ax1.set_title('Before Scaling')
sns.kdeplot(x['x1'], ax=ax1)
sns.kdeplot(x['x2'], ax=ax1)
ax2.set_title('After Robust Scaling')
sns.kdeplot(robust_scaled_df['x1'], ax=ax2)
sns.kdeplot(robust_scaled_df['x2'], ax=ax2)
ax3.set_title('After Min-Max Scaling')
sns.kdeplot(minmax_scaled_df['x1'], ax=ax3)
sns.kdeplot(minmax_scaled_df['x2'], ax=ax3)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment