0% found this document useful (0 votes)
16 views3 pages

Prac File Sol GR XII - 2

Uploaded by

Ratij Bhole
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

Prac File Sol GR XII - 2

Uploaded by

Ratij Bhole
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Date : 13/8/2024

Program 7
Write a program to analyse the performance of the students on the basis of subject. Add title, legend, label on
both axis of the chart.
Solution:
# import pandas and matplotlib
import pandas as pd
import matplotlib.pyplot as plt

# Simple Line Chart with setting of Label of X and Y axis,


# title for chart line and color of line
subject = ['Physic','Chemistry','Mathematics', 'Biology','Computer']
marks =[80,75,70,78,82]
# To draw line in red colour

plt.plot(subject,marks,'r',marker ='*')
# To Write Title of the Line Chart
plt.title('Marks Scored')

# To add legend to the chart


plt.legend("Marks")

# To Put Label At Y Axis


plt.xlabel('SUBJECT')

# To Put Label At X Axis


plt.ylabel('MARKS')
plt.show()
________________________________________________________________________________

output :

_______________________________________________________________________________________________

Date : 16/8/2024
Program 8
Write a program to analyse the performance of the students on the basis of class. Add title, legend, label on
both axis of the chart.
Solution:

# import pandas and matplotlib


import pandas as pd
import matplotlib.pyplot as plt

# Simple Line Chart with setting of Label of X and Y axis,


# title for chart line and color of line
classx = ['Grade IX','Grade X','Grade XI', 'Grade XII']
Totalmarks =[540,620,580,610]
# To draw line in red colour

plt.plot(classx,Totalmarks,'r',marker ='*')
# To Write Title of the Line Chart

plt.title('Class wise Total Marks Scored')

# To add legend to the chart


plt.legend("Marks")

# To Put Label At Y Axis


plt.xlabel('Grades')
# To Put Label At X Axis

plt.ylabel('MARKS')
plt.show()

_________________________________________________________________________________
Output :
_____________________________________________________________________________________________

You might also like