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

scatter is not changing color in Axes3D #5974

Closed
orena1 opened this issue Feb 8, 2016 · 13 comments
Closed

scatter is not changing color in Axes3D #5974

orena1 opened this issue Feb 8, 2016 · 13 comments
Milestone

Comments

@orena1
Copy link

orena1 commented Feb 8, 2016

This simple example, should create an image with a single red circle

import matplotlib.pyplot as ploty

from mpl_toolkits.mplot3d import Axes3D

ploty.ion()

fig = ploty.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(0,0,0,color='red')

But this is what I get

image

Is this a bug?

Thanks.

@WeatherGod
Copy link
Member

Sigh, yeah, it is a bug. I have to check to see if it is still in effect
for v2.0. The work-around is to use "c" instead of "color".

On Mon, Feb 8, 2016 at 9:21 AM, Oren Amsalem notifications@github.com
wrote:

This simple example, should create an image with a single red circle

import matplotlibpyplot as ploty

from mpl_toolkitsmplot3d import Axes3D

plotyion()

fig = plotyfigure()
ax = figadd_subplot(111, projection='3d')
axscatter(0,0,0,color='red')

But this is what I get

[image: image]
https://camo.githubusercontent.com/268883ffc1dfefb8d5984981a5b3aa88bfa2dc44/68747470733a2f2f636c6f756467697468756275736572636f6e74656e74636f6d2f6173736574732f383938333731332f31323838373839332f65336535613435322d636537662d313165352d386633312d313536643636633162663432706e67

Is this a bug?

Thanks


Reply to this email directly or view it on GitHub
#5974.

@tacaswell tacaswell added this to the 1.5.2 (Critical bug fix release) milestone Feb 8, 2016
@tacaswell
Copy link
Member

So for plot you need to use 'color' to avoid py3k dict issues and with scatter you need to use 'c'?

@WeatherGod
Copy link
Member

Ugh, I didn't even think about that. Only that 'c' is explicitly processed
by scatter3d to delete masked points, and 'color' is passed through. Both
'c' and 'color' would then show up to the 2d call of scatter().

On Mon, Feb 8, 2016 at 12:33 PM, Thomas A Caswell notifications@github.com
wrote:

So for plot you need to use 'color' to avoid py3k dict issues and with
scatter you need to use 'c'?


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

@orena1
Copy link
Author

orena1 commented Feb 14, 2016

By the way, facecolor is also not working, (edgecolor is working)

@WeatherGod
Copy link
Member

For the purposes of scatter, facecolor and color are pretty much aliases,
which get clobbered by the 'c' value that scatter3d is emitting...

On Sun, Feb 14, 2016 at 10:24 AM, Oren Amsalem notifications@github.com
wrote:

By the way, facecolor is also not working, (edgecolor is working)


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

@soupault
Copy link
Contributor

I agree, this is a really sad issue.
I'm using (..., c=colors_vec, edgecolors='none', ...) to get expected default behaviour (no edge).
Are there any reasons for scatter kwargs not to be unified with other plotting functions?

@mdboom
Copy link
Member

mdboom commented May 16, 2016

@WeatherGod: Do you think this is an easy fix?

@WeatherGod
Copy link
Member

Might not fix everything, but adding kwarg normalization to the 3d
functions could probably fix some of this, I think?

On Mon, May 16, 2016 at 4:49 PM, Michael Droettboom <
notifications@github.com> wrote:

@WeatherGod https://github.com/WeatherGod: Do you think this is an easy
fix?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#5974 (comment)

@WeatherGod
Copy link
Member

#6426 might actually be relevant here?

On Mon, May 16, 2016 at 5:23 PM, Benjamin Root ben.v.root@gmail.com wrote:

Might not fix everything, but adding kwarg normalization to the 3d
functions could probably fix some of this, I think?

On Mon, May 16, 2016 at 4:49 PM, Michael Droettboom <
notifications@github.com> wrote:

@WeatherGod https://github.com/WeatherGod: Do you think this is an
easy fix?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#5974 (comment)

@WeatherGod
Copy link
Member

So, essentially, I need to update the scatter3d function to not emit 'c' in some cases, I think?

@tacaswell
Copy link
Member

Yes.

WeatherGod added a commit to WeatherGod/matplotlib that referenced this issue May 17, 2016
@WeatherGod
Copy link
Member

I submitted PR #6439 that should fix this issue.

mdboom added a commit that referenced this issue May 17, 2016
Defer to 2D scatter() for handling of 'c'. Closes #5974.
@WeatherGod
Copy link
Member

Closed via #6439

tacaswell pushed a commit to tacaswell/matplotlib that referenced this issue May 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants