100% found this document useful (1 vote)
284 views

Art Integration

This document provides the code for a Python program that plots a line graph of the maximum and minimum temperatures for each day in October 2022. The program imports the matplotlib pyplot library and defines lists for the minimum temperatures, maximum temperatures, and days of the month. It then uses pyplot's plot function to create two lines - one for minimum temperatures in blue and one for maximum temperatures in red. Labels, titles, axes labels and a legend are added before showing the plot.

Uploaded by

kutu paji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
284 views

Art Integration

This document provides the code for a Python program that plots a line graph of the maximum and minimum temperatures for each day in October 2022. The program imports the matplotlib pyplot library and defines lists for the minimum temperatures, maximum temperatures, and days of the month. It then uses pyplot's plot function to create two lines - one for minimum temperatures in blue and one for maximum temperatures in red. Labels, titles, axes labels and a legend are added before showing the plot.

Uploaded by

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

ART INTEGRATION

2022-23

Lucky Ankita Ma'am


20
X-B
Ankita Ma'am
Art Integration
Python program for plotting line
graph for max. And min.
Temperature of days of October 2022
Input :
import matplotlib.pyplot as plt
mintemp =
[27,29,29,29,31,30,32,32,32,29,33,31,33,21,29
,28,24,25,25,24,26,24,28,26,27,30,31,31,30,2
5]
maxtemp =
[43,43,43,45,45,45,44,45,44,44,44,44,44,39,
43,41,38,32,30,34,35,38,38,40,41,42,40,42,4
2,32]
days = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30]
plt.plot(days, mintemp, color="blue",
linewidth=2, marker="o",
markeredgecolor="black",
markersize=5,markerfacecolor="m"
,label="minimum temperature")
plt.plot(days, maxtemp, color="red",
linewidth=3, marker="o",
markeredgecolor="black",
markersize=5,markerfacecolor="m",
label="maximum temperature")
plt.title("Weather Report of june 2022")
plt.xlabel("Date")
plt.ylabel("Temperature")
plt.legend()
plt.show()
Output :

You might also like