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

pyplot.scatter not converting *x* and *y* to a 1-D sequence when the input is a 1xN matrix... #2138

Closed
saullocastro opened this issue Jun 19, 2013 · 5 comments · Fixed by #3394
Milestone

Comments

@saullocastro
Copy link

Please, refer to this question in StackOverflow:
http://stackoverflow.com/q/17189313/832621

where the user was trying to compare two plots that should be identical, and the solution was that in pyplot.scatter the np.ma.ravel() does not convert a 1xN matrix to a 1-D array with length N. But if we do np.ravel() instead of np.ma.ravel() it works...

@WeatherGod
Copy link
Member

This would seem more like a bug with numpy than matplotlib. We need to use np.ma.ravel() as opposed to np.ravel() because we explicitly support masked arrays. While we like to pretend that we support Matrix as well, we don't test them and we don't explicitly say that we support them.

@efiring
Copy link
Member

efiring commented Jun 19, 2013

I think it would make sense to explicitly say that we do not support the Matrix subclass, so it is clearly up to the user to convert to ndarray when necessary.

@dmcdougall
Copy link
Member

Labelled as a documentation bug.

@saullocastro
Copy link
Author

Thank you very much for the responses!
I agree that if the documentation explicitly says the bug will be avoided....

@tacaswell tacaswell added this to the v1.4.x milestone Aug 17, 2014
@tacaswell
Copy link
Member

The question is where to document that we do not support Matrix. Where ever we put it should also include that we do not support pandas objects.

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

Successfully merging a pull request may close this issue.

5 participants