0

I writing a paper where I do a simulation of a fast-food restaurant. I want to plot the result of my simulation in a 2D plot in python. The variables I have are the number of customers per hour and the number of people working behind the counter. With these two variables, I get the percentage of customers that have to wait more than 5 minutes in line.

I want to plot my results in a similar way as the graph below1 that I found in a research article about fast-charging stations for Electric vehicles(source: https://www.mdpi.com/1996-1073/12/10/1986).

Currently, I have my data on the following form.

customers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
employees = [1, 2, 3, 4, 5]
waiting_matrix = np.zeros((len(employees), len(customers)), dtype=float)

my idea for the waiting matrix is let

watiting_matrix[1][4] 

be the percentage of customers that has to wait more than 5 minutes when there are 5 customers and 2 employees

then after doing the simulations, my wait_matrix looks like this:

watitng_matrix = 
[[0.09090909 0.27586207 0.03703704 0.09090909 0.10344828 0.12 0.05555556 0.16666667 0.325    0.18918919
0.]
[0.03333333 0.03448276 0.         0.03571429 0.02702703 0.02777778     0.         0.       0.08108108 0.]
[0.         0.         0.         0.         0.         0.  0.02702703 0.         0.         0.        ]
[0.         0.         0.         0.         0.         0.  0.         0.         0.         0.        ]
[0.         0.         0.         0.         0.         0.  0.         0.         0.         0.       ]]

I have tried to look into the varies plotting formats in matplotlib.pyplot(which is the library I'm most familiar with in python), but I haven't had any success.

Jon
  • 1
  • https://stackoverflow.com/questions/4805048/how-to-get-different-colored-lines-for-different-plots-in-a-single-figure – Joe Nov 23 '19 at 11:42
  • https://www.kaggle.com/andyxie/matplotlib-plot-multiple-lines – Joe Nov 23 '19 at 11:42

0 Answers0