#Linear regression with marginal distributions using seaborn library import matplotlib.pyplot as plt #conda install -c anaconda seaborn import seaborn as sns sns.set_theme(style="darkgrid") def main(): tips = sns.load_dataset("tips") g = sns.jointplot(x="total_bill", y="tip", data=tips, kind="reg", truncate=False, xlim=(0, 60), ylim=(0, 12), color="m", height=7) plt.savefig("ex384.png", dpi=100) plt.show() if __name__ == '__main__': main()
Recent Comments