0% found this document useful (0 votes)
10 views40 pages

Matplotlib Plotting Techniques Guide

Uploaded by

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

Matplotlib Plotting Techniques Guide

Uploaded by

palsaku6
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

• import matplotlib.

pyplot as plt
• import numpy as np

• xpoi = [Link]([0, 6])


• ypoi = [Link]([0, 250])

• [Link](xpoi, ypoi)
• [Link]()
• import [Link] as plt
• import numpy as np

• xpoi = [Link]([1, 8])


• ypoi = [Link]([3, 10])

• [Link](xpoi, ypoi)
• [Link]()
[Link]

• import [Link] as plt


• import numpy as np

• ypoints = [Link]([3, 8, 1, 10])

• [Link](ypoints, marker = 'o')


• [Link]()
[Link]
• import [Link] as plt
• import numpy as np

• ypoi = [Link]([3, 8, 1, 10])

• [Link](ypoi, linestyle = 'dotted')


• [Link]()
• import [Link] as plt
• import numpy as np

• ypoi = [Link]([3, 8, 1, 10])

• [Link](ypoi, linestyle = ‘dashed')


• [Link]()
• import [Link] as plt
• import numpy as np

• ypoi = [Link]([3, 8, 1, 10])

• [Link](ypoi, linestyle =
'dashdot')
• [Link]()
• import numpy as np
• import [Link] as plt

• x = [Link]([80, 85, 90, 95, 100, 105, 110, 115, 120, 125])
• y = [Link]([240, 250, 260, 270, 280, 290, 300, 310, 320,
330])

• [Link](x, y)

• [Link]("Average Pulse")
• [Link]("Calorie Burnage")

• [Link]()
[Link]
import numpy as np
import [Link] as plt

x = [Link]([80, 85, 90, 95, 100, 105, 110, 115, 120, 125])
y = [Link]([240, 250, 260, 270, 280, 290, 300, 310, 320, 330])

[Link](x, y)

[Link]("Sports Watch Data")


[Link]("Average Pulse")
[Link]("Calorie Burnage")

[Link]()
• import numpy as np
• import [Link] as plt

• x = [Link]([80, 85, 90, 95, 100, 105, 110, 115, 120, 125])
• y = [Link]([240, 250, 260, 270, 280, 290, 300, 310, 320, 330])

• [Link]("Sports Watch Data")


• [Link]("Average Pulse")
• [Link]("Calorie Burnage")

• [Link](x, y)

• [Link]()

• [Link]()
import [Link] as plt
import numpy as np

#plot 1:
x = [Link]([0, 1, 2, 3])
y = [Link]([3, 8, 1, 10])

[Link](1, 2, 1)
[Link](x,y)

#plot 2:
x = [Link]([0, 1, 2, 3])
y = [Link]([10, 20, 30, 40])

[Link](1, 2, 2)
[Link](x,y)

[Link]()
import [Link] as plt
import numpy as np

#plot 1:
x = [Link]([0, 1, 2, 3])
y = [Link]([3, 8, 1, 10])

[Link](2, 1, 1)
[Link](x,y)

#plot 2:
x = [Link]([0, 1, 2, 3])
y = [Link]([10, 20, 30, 40])

[Link](2, 1, 2)
[Link](x,y)

[Link]()
• import [Link] as plt
import numpy as np

x = [Link]([5,7,8,7,2,17,2,9,4,11,12,9,6])
y=
[Link]([99,86,87,88,111,86,103,87,94,78,77,85,86])

[Link](x, y)
[Link]()
• import [Link] as plt
• import numpy as np

• x = [Link](["A", "B", "C", "D", "E"])


• y = [Link]([3, 8, 1, 10, 5])

• [Link](x,y)
• [Link]()
import [Link] as plt
import numpy as np

x = [Link](["A", "B", "C", "D"])


y = [Link]([3, 8, 1, 10])

[Link](x, y)
[Link]()
import [Link] as plt
import numpy as np

x = [Link](["A", "B", "C", "D"])


y = [Link]([3, 8, 1, 10])

[Link](x, y, color = "red")


[Link]()
t [Link] as plt

[32, 96, 45, 67, 76, 28, 79, 62, 43, 81, 70,61, 95, 44, 60, 69, 71, 23
9, 54, 76, 67,82, 97, 26, 34, 18, 16, 59, 88, 29, 30, 66,23, 65, 72,
, 78, 49, 73, 62, 87, 37, 68,81, 80, 77, 92, 81, 52, 43, 68, 71, 86]
t(data)
ow()
[Link] as plt
umpy as np

ate random data for the histogram


[Link](0,10,50)
a)

g a basic histogram
data, color='skyblue')

labels and title


l('Values')
l('Frequency')
Basic Histogram')

y the plot
()
Concept of bins in histogram

• import [Link] as plt



• hei = [189, 185, 195, 149, 189, 147, 154,
• 174, 169, 195, 159, 192, 155, 191,
• 153, 157, 140, 144, 172, 157, 181,
• 182, 166, 167]

• [Link](hei, edgecolor="red" , bins=10)
• [Link]()
• import [Link] as plt

• values = [87, 53, 66, 61, 67, 68, 62, 110, 104, 61, 111, 123,
117, 119, 116, 104, 92, 111, 90, 103, 81, 80, 101, 51, 79,
107, 110, 129, 145, 139, 110]

• [Link](values, bins=7, edgecolor="yellow", color="green")
• [Link]()
• import [Link] as plt
import numpy as np

y = [Link]([35, 25, 25, 15])

[Link](y)
[Link]()
import [Link] as plt
import numpy as np

y = [Link]([35, 25, 25, 15])


mylabels = ["Apples", "Bananas", "Cherries", "Dates"]

[Link](y, labels = mylabels)


[Link]()

You might also like