I draw a few curves as follows:
import numpy as np import matplotlib.pyplot as plt plt.plot(x, y)
where x and y are two-dimensional (for example, N x 2 for this example).
Now I would like to set the color of each of these curves independently. I tried things like:
plot(x, y, color= colorArray)
using, for example, colorArray= ['red', 'black'] , but to no avail. The same goes for other options (linestyle, marker, etc.).
I know that this can be done using a for loop. However, since this plot command accepts multidimensional x / y, I thought it should be possible to also specify plotting options this way.
Is it possible? What is the right way to do this? (all that I found when the search used the loop effectively)
source share