Skip to content

Incorrect processing of plot_args when using data argument #11389

Closed
@timhoffm

Description

@timhoffm

Bug report

As opposed to dicts, pandas.DataFramse etc. name in container does not check if a field exists in a numpy array. Hence, mustn't do args[1] in data unconditionally on the data type. This was spotted due to the indirectly related warning:

lib/matplotlib/tests/test_axes.py::test_structured_data
  /home/travis/build/matplotlib/matplotlib/lib/matplotlib/axes/_axes.py:52: FutureWarning: elementwise == comparison failed and returning scalar instead; this will raise an error or perform elementwise comparison in the future.
    if (not args[1] in data and

Possible fixes:

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