Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. sns.set_style("whitegrid")
  2.  
  3. ax = sns.scatterplot(x=x, y=y, s=125)
  4.  
  5. ax.set_xlim(-20, 20)
  6. ax.set_ylim(-20, 20)
  7.  
  8. ax.spines['left'].set_position('zero')
  9. ax.spines['left'].set_color('black')
  10.  
  11. ax.spines['right'].set_color('none')
  12. ax.yaxis.tick_left()
  13.  
  14. ax.spines['bottom'].set_position('zero')
  15. ax.spines['bottom'].set_color('black')
  16.  
  17. ax.spines['top'].set_color('none')
  18. ax.xaxis.tick_bottom()
  19.  
  20. values = ax.get_xticks()
  21. ax.set_xticklabels(["{0:.0%}".format(x/100) for x in values])
  22.  
  23. values = ax.get_yticks()
  24. ax.set_yticklabels(["{0:.0%}".format(y/100) for y in values])
  25.  
  26. ax.tick_params(axis='both', which='major', labelsize=15)
  27.  
  28. ax.grid(True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement