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

pyplot fill_between warning since upgrade of numpy to 1.10.10 #5209

Closed
mhooreman opened this Issue Oct 8, 2015 · 14 comments

Comments

Projects
None yet
8 participants
@mhooreman

Hello,

Since I've upgraded my python 3 environment, I get a warning, as demonstrated below:

%matplotlib inline
import matplotlib.pyplot as plt
plt.fill_between([0, 1], [0, 1])

This gives the warning:

/usr/local/lib/python3.4/dist-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
    if self._edgecolors == str('face')

The upgraded libraries are listed below, I'm pretty sure that this comes from the numpy upgrade

  • Pillow: 2.9.0 -> 3.0.0
  • XlsxWriter: 0.7.3 -> 0.7.5
  • numpy: 1.9.3 -> 1.10.0
  • path.py: 8.1.1 -> 8.1.2
  • pexpect: 3.3 -> 4.0.1
  • psutil: 3.2.1 -> 3.2.2
  • requests: 2.7.0 -> 2.8.0

Best regards.

@jenshnielsen

This comment has been minimized.

Show comment
Hide comment
@jenshnielsen

jenshnielsen Oct 8, 2015

Member

Which version of matplotlib? I think we have already fixed this on master and it will be in matplotlib 1.5.0

At the moment you can ignore the warning. It will not actually break anything before Numpy actually makes the change.

Member

jenshnielsen commented Oct 8, 2015

Which version of matplotlib? I think we have already fixed this on master and it will be in matplotlib 1.5.0

At the moment you can ignore the warning. It will not actually break anything before Numpy actually makes the change.

@tacaswell tacaswell modified the milestone: next bug fix release (2.0.1) Oct 8, 2015

@tlnagy

This comment has been minimized.

Show comment
Hide comment
@tlnagy

tlnagy Oct 11, 2015

I also ran into this problem with numpy v1.10.0 and matplotlib 1.4.3

tlnagy commented Oct 11, 2015

I also ran into this problem with numpy v1.10.0 and matplotlib 1.4.3

@jenshnielsen

This comment has been minimized.

Show comment
Hide comment
@jenshnielsen

jenshnielsen Oct 11, 2015

Member

Please test if this is still an issue with 1.5.0rc2 or master. I think we have already fixed this between 1.4.3 and the current master

Member

jenshnielsen commented Oct 11, 2015

Please test if this is still an issue with 1.5.0rc2 or master. I think we have already fixed this between 1.4.3 and the current master

@jenshnielsen

This comment has been minimized.

Show comment
Hide comment
@mhooreman

This comment has been minimized.

Show comment
Hide comment
@mhooreman

mhooreman Oct 12, 2015

Thanks a lot.

Do you have any idea of the release date of the 1.5.0?

Best regards.

Thanks a lot.

Do you have any idea of the release date of the 1.5.0?

Best regards.

@tacaswell

This comment has been minimized.

Show comment
Hide comment
@tacaswell

tacaswell Oct 12, 2015

Member

"soon", I think we are down to documentation related issues.

https://github.com/matplotlib/matplotlib/milestones/next%20point%20release%20(1.5.0)

Member

tacaswell commented Oct 12, 2015

"soon", I think we are down to documentation related issues.

https://github.com/matplotlib/matplotlib/milestones/next%20point%20release%20(1.5.0)

@pm0kjp

This comment has been minimized.

Show comment
Hide comment
@pm0kjp

pm0kjp Mar 7, 2016

I've upgraded to matplotlib 1.5.1, but still get the error when doing a scatterplot (regular plot is no problem...) Any ideas? Should I downgrade numpy?

pm0kjp commented Mar 7, 2016

I've upgraded to matplotlib 1.5.1, but still get the error when doing a scatterplot (regular plot is no problem...) Any ideas? Should I downgrade numpy?

@jenshnielsen

This comment has been minimized.

Show comment
Hide comment
@jenshnielsen

jenshnielsen Mar 7, 2016

Member

@pm0kjp The original issue should be fixed but you are perhaps seeing something similar. Can you please provide a minimal example that demonstrates the issue that you are seeing. Also this is not an error with the latest release of numpy but a warning that something will change in the future thus there is no reason to downgrade numpy.

Member

jenshnielsen commented Mar 7, 2016

@pm0kjp The original issue should be fixed but you are perhaps seeing something similar. Can you please provide a minimal example that demonstrates the issue that you are seeing. Also this is not an error with the latest release of numpy but a warning that something will change in the future thus there is no reason to downgrade numpy.

@fretchen

This comment has been minimized.

Show comment
Hide comment
@fretchen

fretchen Mar 21, 2016

I've upgraded to matplotlib 1.5.1, but still get the error when doing a fill_between.

I've upgraded to matplotlib 1.5.1, but still get the error when doing a fill_between.

@jenshnielsen

This comment has been minimized.

Show comment
Hide comment
@jenshnielsen

jenshnielsen Mar 21, 2016

Member

@fretchen Do you mean warning rather than error? AFAIK no released version of numpy raises an error here but it does raise a warning.

Furthermore I cannot reproduce the warning in the original example at the top of this bug report.
Can you please provide an example of what you are doing?

Original example:

import matplotlib.pyplot as plt
plt.fill_between([0, 1], [0, 1])
plt.show()

Running this with Matplotlib 1.4.3 I see the warning:

/Users/jhn/Envs/mpl143/lib/python3.5/site-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == str('face'):

But I don't see the warning with Matplotlib 1.5.1

Member

jenshnielsen commented Mar 21, 2016

@fretchen Do you mean warning rather than error? AFAIK no released version of numpy raises an error here but it does raise a warning.

Furthermore I cannot reproduce the warning in the original example at the top of this bug report.
Can you please provide an example of what you are doing?

Original example:

import matplotlib.pyplot as plt
plt.fill_between([0, 1], [0, 1])
plt.show()

Running this with Matplotlib 1.4.3 I see the warning:

/Users/jhn/Envs/mpl143/lib/python3.5/site-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == str('face'):

But I don't see the warning with Matplotlib 1.5.1

@fretchen

This comment has been minimized.

Show comment
Hide comment
@fretchen

fretchen Mar 21, 2016

I am sorry. I forgot to restart the kernel after I installed the matplotlib. So consider my comment to be irrelevant.

I am sorry. I forgot to restart the kernel after I installed the matplotlib. So consider my comment to be irrelevant.

@jenshnielsen

This comment has been minimized.

Show comment
Hide comment
@jenshnielsen

jenshnielsen Mar 21, 2016

Member

@fretchen no problem

Member

jenshnielsen commented Mar 21, 2016

@fretchen no problem

mikecharles added a commit to mikecharles/data-utils that referenced this issue Jun 3, 2016

Suppress FutureWarning from matplotlib function
matplotlib.pyplot.drawcountries() raises a FutureWarning. This will
suppress is until it's fixed in Matplotlib 1.5.

See matplotlib/matplotlib#5209

mikecharles added a commit to mikecharles/data-utils that referenced this issue Jun 3, 2016

Ignore a Matplotlib warning
The follow warning gets raised by Matplotlib when calling
`matplotlib.pyplot.savefig()`:

    .../lib/python3.4/site-packages/matplotlib/collections.py:590:
    FutureWarning: elementwise comparison failed; returning scalar instead,
    but in the future will perform elementwise comparison

See [this Matplotlib
issue](matplotlib/matplotlib#5209)

@QuLogic QuLogic modified the milestones: v1.5.0, 2.0.1 (next bug fix release) Jul 18, 2016

marcelm added a commit to NBISweden/IgDiscover that referenced this issue Jan 31, 2017

@xhain

This comment has been minimized.

Show comment
Hide comment
@xhain

xhain Nov 1, 2017

Have the same issue as OP, getting:

.../anaconda3/lib/python3.5/site-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison if self._edgecolors == str('face'):

xhain commented Nov 1, 2017

Have the same issue as OP, getting:

.../anaconda3/lib/python3.5/site-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison if self._edgecolors == str('face'):

@QuLogic

This comment has been minimized.

Show comment
Hide comment
@QuLogic

QuLogic Nov 1, 2017

Member

You need to upgrade Matplotlib. There is no such line in the current release and even this issue was fixed in 1.5.0.

Member

QuLogic commented Nov 1, 2017

You need to upgrade Matplotlib. There is no such line in the current release and even this issue was fixed in 1.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment