<jupyter_start><jupyter_text>Lets prepare our notebook by importing the necessary libs and dataset<jupyter_code>import os
import matplotlib.pyplot as plt
import pandas as pd

df = pd.read_csv('../data/wine.data',
                 sep=',',
                 header=None)

df.columns = ['class', 'alcohol', 'malic_acid', 'ash', 'alcalinity_of_ash', 'magnesium', 'total_phenols', 'flavanoids',
              'nonflavanoid_phenols', 'proanthocyanins', 'color_intensity', 'hue', 'od280 od315_of_diluted_wines',
              'proline']

os.makedirs('plots/8-matplotlib_multiple_plot_axes', exist_ok=True)

plt.style.use("ggplot")

fig, axes = plt.subplots(1, 1, figsize=(5, 5))<jupyter_output><empty_output><jupyter_text>This time we plot multiple plots on the same axes, to get some perspective on their comparisons<jupyter_code>axes.scatter(df['alcohol'], df['total_phenols'], alpha=0.7, label='Total Phenols')
axes.scatter(df['alcohol'], df['color_intensity'], alpha=0.7, label='Color Intensity')
axes.scatter(df['alcohol'], df['malic_acid'], alpha=0.7, label='Malic Acid')

axes.set_xlabel('Alcohol')
axes.set_ylabel('Total Phenols / Color Intensity')
axes.set_title(f'Alcohol comparisons')
axes.legend()
fig

plt.savefig(f'plots/8-matplotlib_multiple_plot_axes/multiplot_scatter.png', dpi=300)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14826021180030258, 'fraction_numerical': 0.01588502269288956, 'mean_word_length': 5.8549222797927465, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '241257', 'license': 'MIT', 'n_tokens_mistral': 511, 'n_tokens_neox': 466, 'n_words': 90, 'path': '5-python-dataviz-notebook/jupyter/8-matplotlib_multiple_plot_axes.ipynb', 'repo_name': 'eduardohl/CEBD-1160-winter-2020-code', 'size': '1322'}