-
Notifications
You must be signed in to change notification settings - Fork 2
/
Graph_Plotter.py
44 lines (29 loc) · 962 Bytes
/
Graph_Plotter.py
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import matplotlib.pyplot as plt
def graph():
# x = [2, 4, 5]
x = list(input("Enter The Co-ordinates For The X-Axis :" ))
# y = [2, 3, 6]
y = list(input("Enter The Co-ordinates For The Y-Axis :" ))
plt.plot(x, y, color='green', linestyle = "dashed" , linewidth = 3, marker = 'o', markerfacecolor = 'black', markersize = 10, label = 'Line 1')
# plt.ylim(1,8)
# plt.xlim(1,8)
plt.xlabel('X Axis')
plt.ylabel( 'Y Axis')
plt.title('Graph')
plt.show()
def Graph_Plotter():
flag = True
while flag:
print(" ")
print("----------Welcome To The Graph Plotter------------")
print(" ")
print(" ")
print("-----Do You Want To Plot A Graph : ")
user_input = input('''Enter Y To Plot
Enter E To Exit ''').lower()
if user_input == 'y':
graph()
else:
print("Exiting.........")
break
Graph_Plotter()