0% found this document useful (0 votes)
3 views4 pages

Data Visualization with Matplotlib

Uploaded by

manask1703
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
0% found this document useful (0 votes)
3 views4 pages

Data Visualization with Matplotlib

Uploaded by

manask1703
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

12/1/25, 12:25 PM graphs_10_matplotlib - Colab

import [Link] as plt


x=[5,10,15,20,25]
y=[1,2,3,4,5]
[Link](figsize=(15,5))
[Link](x,y, marker='v', color='r')
[Link]("Line plot")
[Link]("Age")
[Link]("Height")

[Link]()

import [Link] as plt


x=[1,2,3,4,5]
y=[5,8,10,11,12]

[Link](figsize=(8,6)) # width =8, height =6


[Link]("Age and weight of a person") # title for the graph
[Link](x,y)
[Link]("Age") # Label for x-axis
[Link]("Weight") # Label for y-axis
[Link]() # display the graph

import [Link] as plt


Study_Hours = [1, 2, 3, 4, 5, 6]
Test_Scores = [45, 50, 65, 70, 75, 85]
[Link](figsize=(8,6))

[Link] 1/4
12/1/25, 12:25 PM graphs_10_matplotlib - Colab
[Link](Study_Hours, Test_Scores, marker="*")
[Link]("Study hours")
[Link]("Study hours")
[Link]("Test scores")
[Link]()

import [Link] as plt


x=[1,2,3,4,5]
y=[5,8,10,11,12]

[Link](figsize=(8,6)) # width =8, height =6


[Link]("Age and weight of a person") # title for the graph
[Link](x,y)
[Link]("Age") # Label for x-axis
[Link]("Weight") # Label for y-axis
[Link]() # display the grap

import [Link] as plt


temp=[20.56,30.48,15.999,10.88,25.768]
cities=["pune","Bangalore", "Jammu", "Srinagar", "Mumbai"]
[Link](temp, labels=cities, autopct="%1.2f%%")

[Link] 2/4
12/1/25, 12:25 PM graphs_10_matplotlib - Colab
[Link]("Pie Chart")
[Link]()

import [Link] as plt


[Link](figsize=(15,5))
Marks = [45, 55, 60, 70, 75, 80, 85, 85, 90, 95]
[Link](Marks, bins=5)
[Link]("Marks")
[Link]()
[Link]()

import [Link] as plt

x = [1, 2, 3, 4, 5]
y = [10, 20, 25, 30, 40]

[Link](x, y)

[Link]([1, 2, 3, 4, 5], ['One', 'Two', 'Three', 'Four', 'Five'], rotation = 45)


[Link]([10, 20, 30, 40], ['Low', 'Medium', 'High', 'Very High'])

[Link]("Custom Ticks Example")


[Link]("X-Axis")
[Link]("Y-Axis")
[Link](True)
[Link]()

[Link] 3/4
12/1/25, 12:25 PM graphs_10_matplotlib - Colab

[Link] 4/4

You might also like