You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for matplotlib.pyplot.plot() (http://matplotlib.org/api/pyplot_api.html?highlight=plot#module-matplotlib.pyplot) states that either c=... or color=... can be used to specify line color in a plot command. For brevity's sake when autogenerating a lot of plot code I have used c without trouble, but today (120427) I have started getting inconstent results, where the color specification is sometimes—but not always—ignored if c=... is used. It does not seem to depend on wether the color is specified as a color name, hex string, or an rgb or rgba tuple.
I can't remember having this problem previously, yet when rerunning some old generated plots the error now shows up there as well (which is not surprising, as the plot generation code is still the same).
Example
import numpy as np
import matplotlib.pyplot as p
p.figure()
x = np.array([0,1])
y0 = np.array([0,1])
y1 = np.array([1,0])
p.plot(x,y0,c='red') # sometimes plots blue
p.plot(x,y1,color='red') # always plots red
p.show()
Environment information
uname -a: Linux blackbird 3.19.2-1-ARCH #1 SMP PREEMPT Wed Mar 18 16:36:01 CET 2015 i686 GNU/Linux pacman -Qi python-matplotlib (excerpt): Version : 1.4.3-2 Build Date : Sat Mar 28 15:34:07 2015 pacman -Qi python (excerpt): Version : 3.4.3-2 Build Date : Thu Mar 26 08:52:32 2015
The text was updated successfully, but these errors were encountered:
Which version of python? If you have just updated to py3k, there has been a
bug that has recently been fixed in master that py3k exposed. py3k
randomizes dictionary access, and it turned out that a spot in our argument
handling code was iterating over a dictionary such that sometimes 'c'
overrode 'color' and sometimes 'color' overrode 'c'.
The documentation for matplotlib.pyplot.plot() ( http://matplotlib.org/api/pyplot_api.html?highlight=plot#module-matplotlib.pyplot)
states that either c=... or color=... can be used to specify line color
in a plot command. For brevity's sake when autogenerating a lot of plot
code I have used c without trouble, but today (120427) I have started
getting inconstent results, where the color specification is sometimes—but
not always—ignored if c=... is used. It does not seem to depend on wether
the color is specified as a color name, hex string, or an rgb or rgba tuple.
I can't remember having this problem previously, yet when rerunning some
old generated plots the error now shows up there as well (which is not
surprising, as the plot generation code is still the same).
Example
import numpy as np
import matplotlib.pyplot as p
p.figure()
x = np.array([0,1])
y0 = np.array([0,1])
y1 = np.array([1,0])
p.plot(x,y0,c='red') # sometimes plots blue
p.plot(x,y1,color='red') # always plots red
p.show()
Environment information
uname -a:
Linux blackbird 3.19.2-1-ARCH #1 SMP PREEMPT Wed Mar 18 16:36:01 CET 2015
i686 GNU/Linux pacman -Qi python-matplotlib (excerpt):
Version : 1.4.3-2
Build Date : Sat Mar 28 15:34:07 2015 pacman -Qi python (excerpt):
Version : 3.4.3-2
Build Date : Thu Mar 26 08:52:32 2015
—
Reply to this email directly or view it on GitHub #4386.
Description
The documentation for matplotlib.pyplot.plot() (http://matplotlib.org/api/pyplot_api.html?highlight=plot#module-matplotlib.pyplot) states that either
c=...
orcolor=...
can be used to specify line color in a plot command. For brevity's sake when autogenerating a lot of plot code I have usedc
without trouble, but today (120427) I have started getting inconstent results, where the color specification is sometimes—but not always—ignored ifc=...
is used. It does not seem to depend on wether the color is specified as a color name, hex string, or an rgb or rgba tuple.I can't remember having this problem previously, yet when rerunning some old generated plots the error now shows up there as well (which is not surprising, as the plot generation code is still the same).
Example
Environment information
uname -a:
Linux blackbird 3.19.2-1-ARCH #1 SMP PREEMPT Wed Mar 18 16:36:01 CET 2015 i686 GNU/Linux
pacman -Qi python-matplotlib (excerpt):
Version : 1.4.3-2
Build Date : Sat Mar 28 15:34:07 2015
pacman -Qi python (excerpt):
Version : 3.4.3-2
Build Date : Thu Mar 26 08:52:32 2015
The text was updated successfully, but these errors were encountered: