n-Graph Plotter using Python

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()


Join our team, where career growth knows no limits.

For More Details

Our internship program guarantees personalized attention for optimal career development in the tech industry.

+91 97879 68375

-> You should bring your own laptop during the internship

Who can apply?

Internships are open for students who: B.E / B.Tech / M.E / M.Tech / B.Sc / M.Sc / M.C.A / B.C.A / Diploma.

  • Ongoing Students Only
  • days, 5days/ 10days or Based on Student Preference
  • Limited 1 to 10 students per slot
  • Registration fees : 1000 INR
  • Slots are filling quickly only fewer slots are available