Skip to content

plt.plot() does not support structured arrays as data= kwarg #8818

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 Jun 29, 2017 · 1 comment
Closed

plt.plot() does not support structured arrays as data= kwarg #8818

anntzer opened this issue Jun 29, 2017 · 1 comment
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Jun 29, 2017

As of 2.0.2 and master:

In [1]: t = np.array([(1, 2), (4, 5)], [("ABCD", float), ("EFGH", float)])
In [2]: plt.scatter("ABCD", "EFGH", data=t) # works
In [3]: plt.plot("ABCD", "EFGH", data=t) # fails with

ValueError: Unrecognized character E in format string

Passing a dict instead works -- there is no ambiguity as to whether "EFGH" should be interpreted as a color spec or a data key.

Other functions (e.g. plt.scatter) have no problem accepting structured arrays as the data= kwarg.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Jun 29, 2017
@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.1.1 (next bug fix release) Sep 24, 2017
@tacaswell tacaswell modified the milestones: 2.1.1 (next bug fix release), 2.2 (next feature release) Oct 9, 2017
zhangeugenia added a commit to zhangeugenia/matplotlib that referenced this issue Mar 16, 2018
zhangeugenia added a commit to zhangeugenia/matplotlib that referenced this issue Mar 16, 2018
zhangeugenia added a commit to zhangeugenia/matplotlib that referenced this issue Mar 16, 2018
@tacaswell tacaswell modified the milestones: needs sorting, v3.0 Mar 16, 2018
zhangeugenia added a commit to zhangeugenia/matplotlib that referenced this issue Mar 22, 2018
zhangeugenia added a commit to zhangeugenia/matplotlib that referenced this issue Mar 22, 2018
zhangeugenia added a commit to zhangeugenia/matplotlib that referenced this issue Mar 22, 2018
zhangeugenia added a commit to zhangeugenia/matplotlib that referenced this issue Mar 22, 2018
zhangeugenia added a commit to zhangeugenia/matplotlib that referenced this issue Mar 22, 2018
zhangeugenia added a commit to zhangeugenia/matplotlib that referenced this issue Mar 22, 2018
zhangeugenia added a commit to zhangeugenia/matplotlib that referenced this issue Mar 22, 2018
zhangeugenia added a commit to zhangeugenia/matplotlib that referenced this issue Mar 22, 2018
@njaremko
Copy link

This should probably be closed

@jklymak jklymak closed this as completed Mar 28, 2018
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