Closed
Description
This comes from a question made here: http://stackoverflow.com/questions/32956419/weird-matplotlib-color-issue-when-plotting-line
I'm running Python v2.7.6 and matplotlib v1.4.3. I have a simple plot:
import matplotlib.pyplot as plt
import numpy as np
x, y = np.random.random(50), np.random.random(50)
plt.plot(x, y, c='red', ls='-', lw=1., label='a', zorder=2)
plt.show()
Notice that the color is supposed to be red as per c='red'
. What I get instead is:
If I use the full name of the argument color='red'
, the line is red as it should. If I remove any of the arguments after c='red'
, e.g.:
plt.plot(x, y, c='red', ls='-', lw=1., label='a')
plt.plot(x, y, c='red', ls='-', lw=1., zorder=2)
plt.plot(x, y, c='red', ls='-', label='a', zorder=2)
plt.plot(x, y, c='red', lw=1., label='a', zorder=2)
the plotted line is also red. Using:
plt.plot(x, y, c='r', ls='-', lw=1., label='a', zorder=2)
(i.e.: c='r'
instead of c='red'
) has no effect on my system, I still get the blue line.