Advertisement
elena1234

barplot with Seaborn in Python

Apr 28th, 2022 (edited)
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 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. #  Create barplot
  7. sns.set(style='darkgrid')
  8. plt.figure(figsize=(10,4), dpi = 200)
  9. df = pd.read_csv("C:/Users/eli/Desktop/dm_office_sales.csv")
  10. barplot = sns.barplot(data=df, x = 'level of education', y = 'salary', estimator = np.mean, ci = 'sd', hue = 'division')
  11. plt.legend(bbox_to_anchor=(1.05,1))
  12. print(barplot)
  13. ########################################
  14. summer.Medal.plot(kind = 'bar', figsize(12,8),fontsize = 12)
  15. plt.show()
  16.  
  17. ##########################################33
  18. summer.Medal.plot(kind = 'barh', figsize(12,8),fontsize = 12)
  19. plt.show()
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement