I have a code like
import matplotlib.pyplot as plt
x_axis=(0,10)
y_axis=(0,10)
label = [1,2,3,4,5,6,7]
print(type(label))
plt.figure()
plt.plot(x_axis,y_axis,color='none')
plt.plot([label])
plt.legend(label)
plt.show()
I made the color = 'none' to clear the lines in the plot. But I want to let all labels in legend have color, what should I do? when the label is an int list, code runs will, but when I want to make an str list legend, it not works(because plt.plot([label]), get error:TypeError: unhashable type: 'numpy.ndarray') but if I remove it, the legend only prints the first values. Example Image