# -*- coding:utf-8 -*-

import pandas
import matplotlib.pyplot as plt
import seaborn as sns

# Import Data
plt.figure(dpi=200)

df = pandas.read_csv("../dataset/mpg_ggplot2.csv")
df_select = df.loc[df.cyl.isin([4, 8]), :]

# Each line in its own column
gridobj = sns.lmplot(
    x="displ",
    y="hwy",
    data=df_select,
    height=7,
    robust=True,
    palette='Set1',
    col="cyl",
    scatter_kws=dict(s=60, linewidths=.7, edgecolors='black')
)

# Decorations
sns.set(style="whitegrid", font_scale=1.5)
gridobj.set(xlim=(0.5, 7.5), ylim=(10, 45))
gridobj.fig.set_size_inches(10, 6)
plt.savefig("../photos/correlation/scatterLinePlot.png")
plt.show()
