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
I was going to put this on SO but I think it might belong here instead:
I have a pandas DataFrame where I want to plot each column as a line with the same color. This might sound useless but I am showing groups of lines from certain selections of the DataFrame. The only problem is it appears that the DataFrame.plot method does not accept any matplotlib hex strings or named colors in the color kwarg.
gives the expected result. To me this seems like a bug considering that color='g' works but not its hex string equivalent. The same issue occurs when trying to use a named matplotlib color like color='lightgray'. This does however work when using Series.plot or DataFrame.plot with one column or if a list of hex strings or named colors are given with length equal to the number of columns as in,
Looks like we parser color='bgr' color line 1 blue, line 2 green, line 3 red. It tries to do that here when it sees a list of characters, but '#' isn't a valid color.
I was going to put this on SO but I think it might belong here instead:
I have a pandas DataFrame where I want to plot each column as a line with the same color. This might sound useless but I am showing groups of lines from certain selections of the DataFrame. The only problem is it appears that the
DataFrame.plot
method does not accept any matplotlib hex strings or named colors in the color kwarg.A trivial example:
gives a blank subplot with no errors, however,
gives the expected result. To me this seems like a bug considering that
color='g'
works but not its hex string equivalent. The same issue occurs when trying to use a named matplotlib color likecolor='lightgray'
. This does however work when usingSeries.plot
orDataFrame.plot
with one column or if a list of hex strings or named colors are given with length equal to the number of columns as in,The text was updated successfully, but these errors were encountered: