Skip to content

Setting markeredgecolor raises a warning #6480

@u55

Description

@u55

Hi matplotlib developers,

Setting markeredgecolor to an RGB or RGBA numpy array now gives a warning in matplotlib 1.5.1. This was not a problem in version 1.4.3. Here is a minimal working example:

import numpy as np
import matplotlib.pyplot as plt

# color = [0.5, 0.5, 0.5, 1.0]  # Works without a warning
color = np.array([0.5, 0.5, 0.5, 1.0])  # Gives a warning

plt.figure()
plt.plot(np.arange(9), np.arange(9), marker='o', markeredgecolor=color)
plt.show()

In python 2.7, it gives this warning:

/usr/lib/python2.7/site-packages/matplotlib/lines.py:1082: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if self._markeredgecolor != ec:

And in python 3.5, it gives this different warning:

/usr/lib/python3.5/site-packages/matplotlib/lines.py:1082: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._markeredgecolor != ec:

Tested on Arch Linux.
--Thanks.

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