ProgrammingwithPython BTIT507
OUTPUT :
Simple straight line graph
Code:
import [Link] as plot1
import numpy as np
X = [Link]([1, 8])
Y = [Link]([3 ,10])
[Link](X,Y)
[Link]()
ProgrammingwithPython BTIT507
Line graph
Code:
import [Link] as plot1
import numpy as np
X = [Link]([1, 2 ,3 , 4])
Y = [Link]([4, 6 ,9 , 8])
[Link](X,Y)
[Link]()
ProgrammingwithPython BTIT507
Dotted line graph
Code:
import [Link] as plot1
import numpy as np
X = [Link]([1, 2 , 4, 3])
Y = [Link]([3, 2 , 4, 1])
[Link](X, Y, marker = 'o', linestyle = "dotted")
[Link]()
ProgrammingwithPython BTIT507
X-AXIS and Y-AXIS Labelled
Code:
import [Link] as plot1
import numpy as np
X = [Link]([1, 2 , 4, 3])
Y = [Link]([3, 2 , 4, 1])
[Link](X, Y, marker = 'o', linestyle = "dotted")
[Link]("X AXIS")
[Link]("Y
AXIS") [Link]()
ProgrammingwithPython BTIT507
BAR GRAPH
Code:
import [Link] as plt
heights = [250, 350, 600]
x_pos = [1, 2, 3]
[Link](x_pos,heights)
[Link]()
ProgrammingwithPython BTIT507
PIE CHART
Code:
import [Link] as plt
sizes = [2.69, 1.98, 1.25, 1.60]
labels = 'Rajat', 'Barbarian', 'Killer', 'Colgate'
[Link](sizes, labels = labels)
[Link]('This is pie chart')
[Link]('equal')
[Link]()