import matplotlib.pyplot as plt # pip install matplotlib
import random
n=int(input("no. of graphs : "))
colors=['black','blue','red','orange','yellow','brown','cyan','pink','green','gold']
letters=['o','x','+','*']
xlabels=input("Enter the X-axis label : ") #High value of x-axis limit
ylabels=input("Enter the Y-axis label : ") #High value of y-axis limit
for a in range(n):
print("--------------------",a+1,"--------------",a+1,"----------------",a+1,"-----------------")
num=int(input("Enter the number of elements :"))
x1=[]
for i in range(num):
x1.append(int(input("Enter the X-axis elements: ")))
y1=[]
for j in range(num):
y1.append(int(input("Enter the Y-axis elements: ")))
plt.plot(x1,y1,color=random.choice(colors),linewidth=3,marker=random.choice(letters),markerfacecolor=random.choice(colors),markersize=8,label="1st-bar")
"""
---------BAR CHART--------
bar_label=['ONE','TWO','THREE','FOUR','FIVE']
plt.bar(x1,y1,tick_label=bar_label,width=0.8,color=['blue','black','brown','green','cyan'])
-------------------------------
"""
""" ''' is used to command multi lines ''' """
plt.xlabel(xlabels)
plt.ylabel(ylabels)
plt.title("Testing graph ")
plt.legend()
plt.show()