My question goes as follows:
Imagine I have four lists a
, b
, c
, d
. I want to plot them by using the same radial grid R
. For some reason a
, b
share a common property X and c
, d
share Y. Therefore I want a
, b
and c
, d
to appear in the same color respectively (green and blue), and I just want two labels to appear into the legend: one being green and resembling X and the other blue and resembling Y. Any ideas of a simple method to do it? An example:
import matplotlib.pyplot as plt
a =[2,4,6,8,10]
b =[3,6,9,12,15]
c =[1,4,9,16,25]
d =[1,8,27,64,125]
R =[0,1,2,3,4]
plt.plot(R,a,color ='green')
plt.plot(R,b,color ='green')
plt.plot(R,c,color ='blue')
plt.plot(R,d,color ='blue')
plt.legend('blue'= X,'green'=Y)
plt.show()