Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error converting to_rgba while using color syntax versus c syntax #4484

Closed
dhhagan opened this issue May 29, 2015 · 4 comments
Closed

Error converting to_rgba while using color syntax versus c syntax #4484

dhhagan opened this issue May 29, 2015 · 4 comments

Comments

@dhhagan
Copy link

dhhagan commented May 29, 2015

If a third variable is used to color a scatter plot, a ValueError is thrown using the keyword color whereas no error is thrown if c is used instead.

Error:

plt.scatter(xdata, ydata, color = colordata, cmap = colormap)

ValueError: to_rgba: Invalid rgba arg XX
to_rgb: Invalid rgb arg XX
cannot convert argument to rgb sequence

No Error:

plt.scatter(xdata, ydata, c = colordata, cmap = colormap)
@efiring
Copy link
Member

efiring commented May 29, 2015

I think this is a misunderstanding, not a bug. There is no intention that keyword "color" be able to specify a set of values to be colormapped. Is there something in the docs indicating otherwise?

@mwaskom
Copy link

mwaskom commented Jun 8, 2015

c and color are pretty much interchangable almost anywhere else in matplotlib...

@efiring
Copy link
Member

efiring commented Jun 8, 2015

@mwascom, I don't see this. At least in a fairly quick scan, I see scads of variations on color (colors, facecolor, etc.) but plot() looks like the only place where there is a c alias for it. I could be missing others. In any case, the scatter documentation is clear and explicit on this point; and the c argument is not a full 'color-style' argument. It is more like 'zdata', since it is used only for color-mapping. It does not work with actual color specifications.

@efiring efiring closed this as completed Jun 8, 2015
@WeatherGod
Copy link
Member

We do "facecolor" == "fc", "edgecolor" == "ec".

On Mon, Jun 8, 2015 at 3:18 AM, Eric Firing notifications@github.com
wrote:

@mwascom, I don't see this. At least in a fairly quick scan, I see scads
of variations on color (colors, facecolor, etc.) but plot() looks like
the only place where there is a c alias for it. I could be missing
others. In any case, the scatter documentation is clear and explicit on
this point; and the c argument is not a full 'color-style' argument. It
is more like 'zdata', since it is used only for color-mapping. It does not
work with actual color specifications.


Reply to this email directly or view it on GitHub
#4484 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants