elena1234

kdeplot in Python

May 25th, 2022 (edited)
618
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. ''' Create a plot that displays the distribution of ratings that are displayed (STARS) VS what the true
  2. rating was from votes(RATING)'''
  3. sns.kdeplot(
  4.     data = fandago,
  5.     shade = True,
  6.     x = 'STARS',
  7.     label = 'STARS'
  8. )
  9.  
  10. sns.kdeplot(
  11.     data = fandago,
  12.     shade = True,
  13.     x = 'RATING',
  14.     label = 'TRUE RATING'
  15. )
  16.  
  17. plt.title('Review distribution of RATING and STARS')
  18. plt.xlabel('Rating')
  19. plt.ylabel('DENCITY')
  20. plt.legend(loc = 'best')
  21.  
  22.  
  23. plt.show()
Add Comment
Please, Sign In to add comment