Skip to content

[ENH]: data kwarg support for mplot3d #20912

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

Closed
anntzer opened this issue Aug 26, 2021 · 2 comments · Fixed by #20951
Closed

[ENH]: data kwarg support for mplot3d #20912

anntzer opened this issue Aug 26, 2021 · 2 comments · Fixed by #20951
Labels
API: consistency Good first issue Open a pull request against these issues if there are no active ones! New feature topic: mplot3d
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Aug 26, 2021

Problem

3d axes don't support the data kwarg:

gcf().add_subplot(projection="3d").scatter("a", "b", "c", data={"a": [0], "b": [1], "c": [2]})

results in

ValueError: could not convert string to float: 'a'

Proposed solution

I think it's "mostly" a matter of adding a bunch of @_preprocess_data decorators to 3D plotting methods similarly to what's done for 2D plots, hence tagging as good-first-issue (though you'll need to understand a bit about the Matplotlib internals).

Additional context and prior art

No response

@anntzer anntzer added New feature topic: mplot3d API: consistency Good first issue Open a pull request against these issues if there are no active ones! labels Aug 26, 2021
@akshat-max
Copy link

Hey I am new to open source can you assign me this issue if its open and some resources that can help me for solving this.

@story645
Copy link
Member

story645 commented Aug 27, 2021

@akshat-max the contributing guide is at https://matplotlib.org/devdocs/devel/index.html. To get familiar w/ the data kwarg, I'd suggest tracing through a couple of the plotting methods that take it as input - you can find em in https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/axes/_axes.py#L1075

story645 added a commit that referenced this issue Sep 19, 2021
…t-mplot3d

[ENH]: data kwarg support for mplot3d #20912
@QuLogic QuLogic added this to the v3.5.0 milestone Sep 25, 2021
timhoffm added a commit that referenced this issue Sep 25, 2021
…951-on-v3.5.x

Backport PR #20951 on branch v3.5.x ([ENH]: data kwarg support for mplot3d #20912)
tacaswell pushed a commit to tacaswell/matplotlib that referenced this issue Oct 12, 2021
…arg-support-mplot3d

[ENH]: data kwarg support for mplot3d matplotlib#20912
tacaswell pushed a commit that referenced this issue Oct 20, 2021
…t-mplot3d

[ENH]: data kwarg support for mplot3d #20912
ericpre pushed a commit to ericpre/matplotlib that referenced this issue Oct 20, 2021
…arg-support-mplot3d

[ENH]: data kwarg support for mplot3d matplotlib#20912
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: consistency Good first issue Open a pull request against these issues if there are no active ones! New feature topic: mplot3d
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants