Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Fri.

Oct 27th, 2023 7:21:21 PM      

TutorialAICSIP
A best blog for CBSE Class
IX to Class XII

SUBJECTS
Important Programs Plotting
with Python Class 12 Artificial Intelligence

By tutorialaicsip
Computer Science
 OCT 27, 2020

Informatics Practices

In this article, you will find Important Programs Plotting with Python Class 12. You can use
Information Technology
these programs in your practical file as practical records.

Important Programs Plotting with Python Computer Applications

Class 12
In this section of important programs plotting with python class 12, we will cover practicals to
Connect with us
plot a single line chart.
for an update

[1] Plot following data on line chart:

Day Monday Tuesday Wednesday Thursday Friday


Type your email…
Income 510 350 475 580 600

Subscribe

1. Write a title for the chart “The Weekly Income Report”. Join 8,074 other
2. Write the appropriate titles of both the axes.
subscribers
3. Write code to Display legends.
4. Display red color for the line.

Trending
5. Use the line style – dashed
6. Display diamond style markers on data points

IP project class 12 python


with coding –
Comprehensi
import matplotlib.pyplot as pp ve Guide
day =['Monday','Tuesday','Wednesday','Thursday','Friday']
inc = [510,350,475,580,600]
pp.plot(day,inc,label='Income',color='r',linestyle='dashed',marker='D') Important
pp.title("The Weekly Income Report") Artificial
pp.xlabel("Days") Intelligence
Class 9 Book
pp.ylabel("Income")
Complete PDF 2022-23
pp.legend()
pp.show()
IT 402
Practical file
Class 10 Best
Output: PDF Sample
for 2022-23

CBSE
Artificial
Intelligence
Class 10
Sample Paper 2023-24 –
A Comprehensive Guide

Comprehensi
ve Guide
Answer Key
Artificial
Intelligence Class 10
Board Exam 2023

Answer Key
Computer
Science
Class 12
Board Paper 2023 PDF
Easy Complete Solutions
[2] A Shivalik restaurant has recorded the following data into their register for their income by
Drinks and Food. Plot them on the line chart.
Python
MySQL
Day Monday Tuesday Wednesday Thursday Friday connectivity
class 12 in 4
Drinks 450 560 400 605 580 easy steps

Food 490 600 425 610 625 25+ best


Programs for
Computer
Apply following customization to the line chart. practical file
Class 12
1. Write a title for the chart “The Weekly Restaurant Orders”.
2. Write the appropriate titles of both the axes. Important
3. Write code to Display legends. QnA String
Manipulation
4. Display your choice of colors for both the lines drinks and food.
in Python
5. Use the line style – dotted for drinks and dashdot for food. Class 11
6. Display plus markers on drinks and x markers of food.
Practical File
Computer
Applications
Class 10
Comprehensive Guide

LATEST

A python program to
check valid password
Notes Entrepreneurial
import matplotlib.pyplot as pp
Skills Class10 – Simple
day =['Monday','Tuesday','Wednesday','Thursday','Friday']
and Comprehensive
dr = [450,560,400,605,580]
fd = [490,600,425,610,625]
CBSE Sample Paper 2024
pp.plot(day,dr,label='Drinks',color='g',linestyle='dotted',marker='+') for Information
pp.plot(day,fd,label='Food',color='m',linestyle='dashdot',marker='x') Technology Class 10
pp.title("The Weekly Restaurant Orders")
Everything You Need to
Know About
pp.xlabel("Days")
pp.ylabel("Orders")
CBSE Artificial
pp.legend()
Intelligence Class 10
pp.show() Sample Paper 2023-24 –
A Comprehensive Guide

Output: Class 11 computer


science half yearly exam
practical question paper
Comprehensive Guide

Half Yearly Sample Paper


IT 402 Class 10 – A
comprehensive guide
Download PDF

Half yearly Sample Paper


AI Class 10 – A
comprehensive guide

CBSE computer science


class 12 previous year
question papers pdf

CBSE Veergatha Project


Edition 3.0 – A
comprehensive guide

[3] Observe the given data for monthly views of one of the youtube channels for 6 months. Plot Comprehensive notes
them on the line chart. Information and
Communication
Technology Skills class
Month January February March April May June 10

Views 2500 2100 1700 3500 3000 3800

WHAT YOU MISSED


Apply following customizations to the chart:

1. Give the title for the chart – “Youtube Stats” Pandas Series program to
display palindrome names
2. Use the “Month” label for X-Axis and “Views” for Y-Axis.
for IP Class 12
3. Display legends.
4. Use dashed lines with the width 5 point.
5. Use red color for the line.
6. Use dot marker with blue edge color and black fill color.

Python Program Create


Pandas Series and
Display palindrome
numbers –
Comprehensive Guide for
class 12 IP
import matplotlib.pyplot as pp
mon =['January','February','March','April','May','June']
views = [2500,2100,1700,3500,3000,3800]
pp.plot(mon,views,label='Views State',color='r',linestyle='dashed',
linewidth=4,\
marker='o', markerfacecolor='k', markeredgecolor='b')
Solved Informatics
pp.title("Youtube Stats") Practices Practical
pp.xlabel("Months") Question Paper Class 12
pp.ylabel("Views")
pp.legend()
pp.show()

Output: IP project class 12 python


with coding –
Comprehensive Guide

Term 2 Practical Paper


Class 12 IP 2022
Comprehensive Guide

Term 2 Practical File


Informatics Practices
Class 12 Comprehensive
Guide

[4] Consider the following data of a medical store and plot the data on the line chart:

Month Masks Sanitizer Hand wash

March 1500 4400 6500 IP Class 12 Term 1


Practical Question Paper
April 3500 4500 5000 – A comprehensive notes

May 6500 5500 5800


Download Practical File
June 6700 6000 6300 Informatics Practices
Class 12 A
July 6000 5600 6200 comprehensive guide

August 6800 6300 4500

Customize the chart as you wish.

5 Solved IP Practical
Paper CBSE Board Exam
2023

The comprehensive guide


Class 12 ip practical file
2022-23
import matplotlib.pyplot as pp
mon =['March','April','May','June','July','August']
mask= [1500,3500,6500,6700,6000,6800]
san = [4400,4500,5500,6000,5600,6300]
hw = [6500,5000,5800,6300,6200,4500]
pp.plot(mon,mask,label='Mask',color='g',linestyle='dashed', linewidth=4,\ Data transfer CSV to
marker='o', markerfacecolor='k', markeredgecolor='r') dataframe class 12 IP –
pp.plot(mon,san,label='Mask',color='b',linestyle='dashed', linewidth=4,\ Important Programs
marker='3', markerfacecolor='k', markeredgecolor='g')
pp.plot(mon,hw,label='Mask',color='r',linestyle='dashed', linewidth=4,\
marker='v', markerfacecolor='k', markeredgecolor='b')
pp.title("Fitwell Medical Store")
pp.xlabel("Months")
pp.ylabel("Covid Protections") Important Programs
Plotting with Python
pp.legend()
Class 12
pp.show()

Program List Python


DataFrame for Practical
Output: File

IP practical file python


programs on series with
solution 2021

R
at
[5] Use above data and subplot sanitizer data and handwash data. e
o
ur
w
eb
sit
e

Name (required)

Email (required)
import matplotlib.pyplot as pp
mon =['March','April','May','June','July','August']

Please rate our


san = [4400,4500,5500,6000,5600,6300]
website (required)
hw = [6500,5000,5800,6300,6200,4500]
1 - Very Bad

2 - Poor
pp.subplot(2,1,1)
3 - Average
pp.plot(mon,san,label='Sanitizer',color='b',linestyle='dashed',
4 - Good
linewidth=4,\
5 - Excellent
marker='o', markerfacecolor='k', markeredgecolor='r')
pp.title("Fitwell Medical Store")
How could we

improve? (required)
pp.legend()

pp.subplot(2,1,2)
pp.plot(mon,hw,label='Handwash',color='r',linestyle='dashed', linewidth=4,\
marker='v', markerfacecolor='k', markeredgecolor='b')
pp.xlabel("Months")
pp.ylabel("Covid Protections")
pp.legend()
pp.show()

Send
Output:
Feedback

[6] Write a program to plot a range from 1 to 30 with step value 4. Use the following algebraic
expression to show data.

y = 5*x+2

import matplotlib.pyplot as pp
import numpy as np
x = np.arange(1,30,4)
y = 5 * x + 2
pp.plot(x,y)
pp.show()

Output:
[7] Display following bowling figures through bar chart:

Overs Runs

1 6

2 18

3 10

4 5

import matplotlib.pyplot as pp
overs =[1,2,3,4]
runs=[6,18,10,5]
pp.bar(overs,runs,color='m')
pp.xlabel('Overs')
pp.xlabel('Runs')
pp.title('Bowling Spell Analysis')
pp.xticks([1,2,3,4])
pp.yticks([5,10,15,20])
pp.show()

Output:
[8] Observe following data and plot data according to given instructions:

Batsman 2017 2018 2019 2020

Virat Kohli 2501 1855 2203 1223

Steve Smith 2340 2250 2003 1153

Babar Azam 1750 2147 1896 1008

Rohit Sharma 1463 1985 1854 1638

Kane Williamson 1256 1785 1874 1974

Jos Butler 1125 1853 1769 1436

1. Create a bar chart to display data of Virat Kohli & Rohit Sharma.
Customize the chart in this manner
Use different widths
Use different colors to represent different years score
Display appropriate titles for axis and chart
Show legends
2. Create a bar chart to display data of Steve Smith, Kane Williamson & Jos Butler.
Customize Chart as per your wish.
3. Display data of all players for the specific year.

Follow this link for notes:

Data visualization notes


      

 Data transfer CSV to dataframe class Program List Python DataFrame for
12 IP – Important Programs Practical File 
By tutorialaicsip

RELATED POST

Pandas Series Python Solved


program to… Program Crea… Informatics…

7 thoughts on “Important Programs Plotting with Python Class 12”


waseem says:
at

answer for 8th question?

LOG IN TO REPLY

tutorialaicsip says:
at

This is given for self practice to students.

LOG IN TO REPLY

Bhagwan says:
at

EVEN DONT KNOW THE ANSWER

LOG IN TO REPLY

TheWeebGuy says:
at

Can we get the answer of the 8th one?

LOG IN TO REPLY

No one says:
at

Did you get the answer?

LOG IN TO REPLY

Aarav Chowdhury says:


at

Please the 8th one

LOG IN TO REPLY

Girish Patil says:


at

Observe following data and plot data according to given instructions:


Batsman 2017 2018 2019 2020
Virat Kohli 2501 1855 2203 1223
Steve Smith 2340 2250 2003 1153
Babar Azam 1750 2147 1896 1008
Rohit Sharma 1463 1985 1854 1638
Kane Williamson 1256 1785 1874 1974
Jos Butler 1125 1853 1769 1436
1. Create a bar chart to display data of Virat Kohli & Rohit Sharma.
2. Customize the chart in this manner
2.1 . Use different widths
2.2. Use different colors to represent different years score
2.3. Display appropriate titles for axis and chart
2.4. Show legends
import numpy as np
import matplotlib.pyplot as plt
set width of bar
barWidth = 0.25
fig = plt.subplots(figsize =(12, 8))
set height of bar
Virat_Kohli = [2501,1855,2203,1223]
Rohit_Sharma = [1463,1985,1854,1638]
Set position of bar on X axis
br1 = np.arange(len(Virat_Kohli))
br2 = [x + barWidth for x in br1]
br3 = [x + barWidth for x in br2]
Make the plot
plt.bar(br1, Virat_Kohli, color =’r’, width = barWidth,
edgecolor =’grey’, label =’Virat_Kohli’)
plt.bar(br2, Rohit_Sharma, color =’g’, width = barWidth,
edgecolor =’grey’, label =’Rohit_Sharma’)
Adding Xticks
plt.xlabel(‘Year’, fontweight =’bold’, fontsize = 15)
plt.ylabel(‘Runs’, fontweight =’bold’, fontsize = 15)
plt.xticks([r + barWidth for r in range(len(Virat_Kohli))],
[ ‘2017’, ‘2018’, ‘2019’,’2020′])
plt.legend()
plt.show()
/////////////////////////////////////////////////////////////////////////////
2.5. Create a bar chart to display data of Steve Smith, Kane Williamson
& Jos Butler. Customize Chart as per your wish.
import numpy as np
import matplotlib.pyplot as plt
set width of bar
barWidth = 0.25
fig = plt.subplots(figsize =(12, 8))
set height of bar
Steve_Smith = [2340,2250,2003,1153]
Kane_Williamson = [1256,1785,1874,1974 ]
Jos_Butler = [1125,1853,1769,1436]
Set position of bar on X axis
br1 = np.arange(len(Steve_Smith))
br2 = [x + barWidth for x in br1]
br3 = [x + barWidth for x in br2]
Make the plot
plt.bar(br1, Steve_Smith, color =’r’, width = barWidth,
edgecolor =’grey’, label =’Steve_Smith’)
plt.bar(br2, Kane_Williamson, color =’g’, width = barWidth,
edgecolor =’grey’, label =’Kane_Williamson’)
plt.bar(br3, Jos_Butler, color =’b’, width = barWidth,
edgecolor =’grey’, label =’Jos_Butler’)
Adding Xticks
plt.xlabel(‘Years’, fontweight =’bold’, fontsize = 15)
plt.ylabel(‘Runs’, fontweight =’bold’, fontsize = 15)
plt.xticks([r + barWidth for r in range(len(Steve_Smith))],
[‘2017’, ‘2018’, ‘2019’,’2020′])
plt.legend()
plt.show()
//////////////////////////////////////////////////////////////////////////
2.6. Display data of all players for the specific year
import numpy as np
import matplotlib.pyplot as plt
set width of bar
barWidth = 0.10
fig = plt.subplots(figsize =(12, 8))
set height of bar
Virat_Kohli = [2501,1855,2203,1223]
Steve_Smith = [2340,2250,2003,1153]
Babar_Azam = [1750,2147,1896,1008]
Rohit_Sharma = [1463,1985,1854,1638]
Kane_Williamson = [1256,1785,1874,1974 ]
Jos_Butler = [1125,1853,1769,1436]
Set position of bar on X axis
br1 = np.arange(len(Steve_Smith))
br2 = [x + barWidth for x in br1]
br3 = [x + barWidth for x in br2]
br4 = [x + barWidth for x in br3]
br5 = [x + barWidth for x in br4]
br6 = [x + barWidth for x in br5]
Make the plot
plt.bar(br1, Virat_Kohli, color =’red’, width = barWidth,
edgecolor =’grey’, label =’Virat_Kohli’)
plt.bar(br2, Steve_Smith, color =’cyan’, width = barWidth,
edgecolor =’grey’, label =’Steve_Smith’)
plt.bar(br3,Babar_Azam, color =’magenta’, width = barWidth,
edgecolor =’grey’, label =’Babar_Azam’)
plt.bar(br4, Rohit_Sharma, color =’yellow’, width = barWidth,
edgecolor =’grey’, label =’Rohit_Sharma’)
plt.bar(br5, Kane_Williamson, color =’green’, width = barWidth,
edgecolor =’grey’, label =’Kane_Williamson’)
plt.bar(br6, Jos_Butler, color =’blue’, width = barWidth,
edgecolor =’grey’, label =’Jos_Butler’)
Adding Xticks
plt.xlabel(‘Years’, fontweight =’bold’, fontsize = 15)
plt.ylabel(‘Runs’, fontweight =’bold’, fontsize = 15)
plt.xticks([r + barWidth for r in range(len(Steve_Smith))],
[‘2017’, ‘2018’, ‘2019’,’2020′])
plt.legend()
plt.show()
LOG IN TO REPLY

AD

Leave a Reply
You must be logged in to post a comment.

Important Site Links Important Content at a Glance

Privacy Policy 200 + Important CBSE Computer Science Class 12 previous year
Contact Us questions
Terms & Conditions A comprehensive notes for Informatics Practices with Python – CBSE
Disclaimer Curriculum 2023
About us – TutorialAICSIP educational blog AI Class 10 AI Project Cycle Revision Notes Very Important
Computer Science Class 12 Notes A Comprehensive Guide An easy explanation for Courses on TutorialAICSIP for 9 to 12
Informatics Practices Class12 Comprehensive Study Material CBSE IT 402 Class 10 complete Study Material accomplish your goal
An easy explanation for Courses on TutorialAICSIP for 9 to 12 Comprehensive notes Artificial Intelligence Class 9 CBSE
Home – TutorialAICSIP comprehensive blog for CBSE 10, 11, 12 Comprehensive notes CBSE Computer Science 2022-23
10+ Solved IP Class 12 Term 2 Sample Paper 2022 – Important Comprehensive study Material CBSE Computer Applications Class 10
Most Useful Sample Paper Computer Science Class 12 Computer Science Class 12 Notes A Comprehensive Guide
100+ Important and Most expected questions IP Class 12 CUET Computer Science Informatics Practices 308 Comprehensive
100+ Important Most expected questions Computer Science Class 12 Notes
CUET Computer Science Informatics Practices 308 Comprehensive Embed iList
Notes important CUET UG 2022 sample questions Computer Science
important CUET UG 2022 sample questions Computer Science Informatics Practices Class12 Comprehensive Study Material
Python tkinter Tutorial 2022 Comprehensive Guide Python tkinter Tutorial 2022 Comprehensive Guide
200 + Important CBSE Computer Science Class 12 previous year
questions
Embed iList

Copyright © 2023 TutorialAICSIP Powered by TutorialAICSIP


Share

You might also like