elena1234

scatterplot with Seaborn in Python

Apr 28th, 2022 (edited)
844
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. import numpy as np
  2. import pandas as pd
  3. import matplotlib.pyplot as plt
  4. import seaborn as sns
  5.  
  6. plt.figure(figsize=(12,4), dpi = 200)
  7. df = pd.read_csv("C:/Users/eli/Desktop/dm_office_sales.csv")
  8. plot1 = sns.scatterplot(x =  'salary', y = 'sales', data = df, style = 'level of education', hue = 'level of education', palette=('Dark2'), s = 200, alpha = 0.2)
  9. print(plot1)
  10.  
  11. # sns.regplot(x="BMXLEG", y="BMXARML", data=df, fit_reg=False, scatter_kws={"alpha": 0.2})
Add Comment
Please, Sign In to add comment