Codes R
Codes R
Artist = ['Ed Sheeran', 'Rihanna', 'The Weeknd', 'Justin Bieber', 'Michael Jackson']
# Bar graph
plt.figure(figsize=(8, 5))
plt.xlabel("Artists", fontsize=12)
plt.xticks(rotation=45)
plt.show()
import pandas as pd
Artist = ['Ed Sheeran', 'Rihanna', 'The Weeknd', 'Justin Bieber', 'Michael Jackson']
# Line graph
plt.figure(figsize=(8, 5))
plt.xlabel("Artists", fontsize=12)
plt.xticks(rotation=45)
plt.grid(True)
plt.show()
import pandas as pd
# Histogram
plt.figure(figsize=(8, 5))
plt.ylabel("Frequency", fontsize=12)
plt.grid(True)
plt.show()