Created
June 25, 2019 15:42
-
-
Save searope/4127508683841b934215649bd2f3ed0c to your computer and use it in GitHub Desktop.
matplotlib.pyplot tips and tricks
This file contains hidden or 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 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