Python Forum
Multiple Plotting in Same PLot
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Plotting in Same PLot
#1
Hello,

I want to plot multiple curve in sale plot line here:
[Image: matplotlib-examples-displaying-and-configuring-legend]
example

My x and y values are depend on another third variable.
  number_of_result = []
  step= []
  queuesize=[]
  for j in range(5,200,5): #here is my third value
   for i in range(300):  here is my x values
    ....
    number_of_result.append(len(result2))  #here is my y values
    step.append(i)  #here is my x values
    print(result2, len(result2))
   
   queuesize.append(j) 
  plt.plot(step,number_of_result,label='Tmax= %d'% Tmax)   
  plt.xlabel(" life time(s)")
  plt.ylabel("number of result")
I could not give legend and I could not give different color to my curves. So my output image is here:
[Image: 68JgJD5]
image
It seems very confusing. How can I make it more readable, how can I give it legends for each curve and how can I give curves colors?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Plot multiple 2D Curves in 3D stc 5 968 Jun-11-2023, 05:48 PM
Last Post: snippsat
  Trying to loop through code to plot seaborn line plots across multiple subplots eyavuz21 0 1,674 Dec-05-2022, 10:46 AM
Last Post: eyavuz21
  Plotting Multiple files ! Helen_145 1 2,714 Jun-26-2021, 03:28 PM
Last Post: snippsat
  Multiple Line Chart Plotting moto17 1 2,494 Jan-20-2021, 01:38 PM
Last Post: wostan
  How to plot intraday data of several days in one plot mistermister 3 2,915 Dec-15-2020, 07:43 PM
Last Post: deanhystad
  Plotting 3D surface plot for non-linear multivariate regression with 5 variables khwajaosama 0 2,710 Jul-02-2020, 04:50 AM
Last Post: khwajaosama
  plot multiple employee sales data in a single graph pitanshu 0 1,916 Oct-24-2019, 01:56 PM
Last Post: pitanshu
  Plot multiple csv into one graph problem with visualize linkxxx86 1 5,720 Oct-14-2019, 05:54 PM
Last Post: linkxxx86
  How to plot multiple scatter plots in seaborn vikola 2 6,496 Jul-14-2019, 10:30 AM
Last Post: vikola
  How to plot vertically stacked plot with same x-axis and SriMekala 0 1,929 Jun-12-2019, 03:31 PM
Last Post: SriMekala

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020