Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
Milestone
@anntzer

Description

@anntzer

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) # worksIn [3]: plt.plot("ABCD", "EFGH", data=t) # fails withValueError: 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp