import matplotlib.pyplot as plt
x = [2015, 2016, 2017, 2018, 2019, 2020, 2021]
y = [1, 2, 5, 10, 21, 40, 54]
plt.plot(x, y)
plt.show()
plt.plot(x, y, marker='o', linestyle='--', color='g')
plt.show()
plt.plot(x, y, marker='o', linestyle='--', color='g')
plt.xlabel('Years')
plt.ylabel('Revenue')
plt.title('Revenue per year')
plt.show()
x = ['Data Science', 'Web Development', 'Mobile Development']
y = [400, 500, 250]
plt.bar(x, y)
plt.show()
prices = [1000, 2300, 3001, 3450, 4200, 4780, 5100, 5500, 6000, 7500]
bins = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000]
plt.hist(prices, bins)
plt.show()
x = [2015, 2016, 2017, 2018, 2019, 2020, 2021]
y = [1, 2, 5, 10, 21, 40, 54]
plt.scatter(x, y)
plt.show()
import pandas as pd
df = pd.read_csv('/work/StudentsPerformance.csv')
df.head()
df.columns
bins=[0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
plt.hist(df['math score'], bins)
plt.xlabel('Math score')
plt.ylabel('Number of students')
plt.show()
y = df['math score']
x = df['reading score']
plt.scatter(x, y)
plt.xlabel('Math score')
plt.ylabel('Reading score')
plt.show()