Category : plot

I have a dataset similar to the following: import pandas as pd data = {‘Country’: [‘Spain’, ‘Italy’, ‘France’, ‘Germany’, ‘Portugal’, ‘Greece’, ‘UK’, ‘Spain’, ‘Italy’, ‘France’, ‘Germany’, ‘Portugal’, ‘Greece’, ‘UK’, ‘Spain’, ‘Italy’, ‘France’, ‘Germany’, ‘Portugal’, ‘Greece’, ‘UK’], ‘Date’: [‘Jan 2020’, ‘Jan 2020’, ‘Jan 2020’, ‘Jan 2020’, ‘Jan 2020’, ‘Jan 2020’, ‘Jan 2020’, ‘Feb 2020’, ‘Feb 2020’, ..

Read more

I am constructing a simple graph with the following code: plt.figure(figsize=(7, 3)) plt.plot(idl_t, idl_q, color="blue", lw=2) plt.plot(dsc_t, dsc_q, color="red", lw=2) plt.plot(cha_t, cha_q, color="green", lw=2) plt.xlabel("Time (hour)") plt.show() with input data as following: idl_t, idl_q = [[0, 20], [8, 24]], [[100, 100], [100, 100]] dsc_t, dsc_q = [[8, 14], [12, 18]], [[100, 100], [5, 5]] cha_t, ..

Read more