-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Different result, slower runtime of heatmap between 2.0.0 and 2.0.1 #8947
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
Comments
@NickG123 Could you test if the problem is still there with Matplotlib 2.1? On my own workstation (Fedora 26), with Python 3.6.3 and Matplotlib 2.1 (both from conda), the results are more similar to yours with Matplotlib 2.0.0 than those with Matplotlib 2.0.1:
|
I did not perform a proper |
@afvincent Thanks for having a look. I do see a significant improvement in performance with Matplotlib 2.1, back down to roughly the same speed as 2.0.0. However, the resulting image is very strage: I do get a couple of warnings that might be related, but they are coming out of the Basemap library, not my code:
|
The warnings can be fixed by updating basemap using conda-forge, or
installing from source.
…On Wed, Oct 18, 2017 at 9:03 AM, Nick Gerow ***@***.***> wrote:
@afvincent <https://github.com/afvincent> Thanks for having a look.
I do see a significant improvement in performance with Matplotlib 2.1,
back down to roughly the same speed as 2.0.0.
However, the resulting image is very strage:
[image: test]
<https://user-images.githubusercontent.com/8438951/31719927-0d7bc45a-b3e3-11e7-96af-259aee4730dd.png>
I do get a couple of warnings that might be related, but they are coming
out of the Basemap library, not my code:
C:\Python27\lib\site-packages\mpl_toolkits\basemap\__init__.py:1704: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead.
limb = ax.axesPatch
C:\Python27\lib\site-packages\mpl_toolkits\basemap\__init__.py:1707: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead.
if limb is not ax.axesPatch:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8947 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARy-FbmOvg9QJWTDcZh6fgtlhxtqF9zks5stfc_gaJpZM4OlzQ->
.
|
Also, I find it interesting that your 2.0.0 image has dashed grid lines,
but 2.0.1 has solid grid lines...
Can you try some different interpolations? I wonder if this is the result
of some of the masking work Thomas was doing?
…On Wed, Oct 18, 2017 at 9:41 AM, Benjamin Root ***@***.***> wrote:
The warnings can be fixed by updating basemap using conda-forge, or
installing from source.
On Wed, Oct 18, 2017 at 9:03 AM, Nick Gerow ***@***.***>
wrote:
> @afvincent <https://github.com/afvincent> Thanks for having a look.
>
> I do see a significant improvement in performance with Matplotlib 2.1,
> back down to roughly the same speed as 2.0.0.
>
> However, the resulting image is very strage:
> [image: test]
> <https://user-images.githubusercontent.com/8438951/31719927-0d7bc45a-b3e3-11e7-96af-259aee4730dd.png>
>
> I do get a couple of warnings that might be related, but they are coming
> out of the Basemap library, not my code:
>
> C:\Python27\lib\site-packages\mpl_toolkits\basemap\__init__.py:1704: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead.
> limb = ax.axesPatch
> C:\Python27\lib\site-packages\mpl_toolkits\basemap\__init__.py:1707: MatplotlibDeprecationWarning: The axesPatch function was deprecated in version 2.1. Use Axes.patch instead.
> if limb is not ax.axesPatch:
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#8947 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AARy-FbmOvg9QJWTDcZh6fgtlhxtqF9zks5stfc_gaJpZM4OlzQ->
> .
>
|
The fuzz over the oceans is almost certainly the same as the fuzz we saw at the edges of #8966 Trying with a lower-order interpolation might help. |
Looks like that's the problem |
@NickG123 can you reproduce this with 2.2.3? |
Hi @tacaswell, It looks like v2.2.3 still produces the same result as with 2.1 above. However, my use case is satisfied by using a lower order interpolation, so I guess it is up to you how much of a priority this is. Thanks, |
I think we solved the original problem, so I'm closing, but feel free to re-open... |
Bug report
Bug summary
I am using Matplotlib with Basemap to create heatmaps of data.
A change introduced between version 2.0.0 and 2.0.1 caused my code to:
The problem still seems to exist in 2.0.2.
I also ran some profiling to have a look at the differences, and the increase in time seems to be in the
resample
function (from 0.473s total time to 19.042s total time)Code for reproduction
Version 2.0.0 outcome
python -m cProfile --sort=tottime script.py
:Version 2.0.1 outcome
python -m cProfile --sort=tottime script.py
:Matplotlib version
The text was updated successfully, but these errors were encountered: