Skip to content
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

Deprecations for Matplotlib-3.0.0rc2 #2963

Closed
stonebig opened this issue Aug 28, 2018 · 19 comments
Closed

Deprecations for Matplotlib-3.0.0rc2 #2963

stonebig opened this issue Aug 28, 2018 · 19 comments

Comments

@stonebig
Copy link
Contributor

with matplotlib-3.0.0rc2, some annoying deprecation warning do arrive
image

apparently, holoviews still generates the now unwanted parameters.

https://github.com/ioam/holoviews/blob/63cfac9e104b134f9dcb7eb0f1b16196df16e2db/holoviews/plotting/mpl/plot.py#L133..L134

see:

stonebig referenced this issue in matplotlib/matplotlib Aug 28, 2018
@jlstevens
Copy link
Contributor

Thanks for reporting this!

It is good to have users report what is coming up in upcoming matplotlib versions as we use the stable releases for ourselves and for testing.

@stonebig
Copy link
Contributor Author

so you will test against matplotlib-3.0.0 (on Python 3.5+ branches), if it's released tomorrow ?

@philippjfr
Copy link
Member

I'll do my best.

@stonebig
Copy link
Contributor Author

matplotlib-3.0 final is out.

@philippjfr
Copy link
Member

Thanks, I'll try it now.

@philippjfr
Copy link
Member

Okay I also see those deprecation warnings:

/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/matplotlib/__init__.py:846: MatplotlibDeprecationWarning: 
The text.latex.unicode rcparam was deprecated in Matplotlib 2.2 and will be removed in 3.1.
  "2.2", name=key, obj_type="rcparam", addendum=addendum)
/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/matplotlib/__init__.py:855: MatplotlibDeprecationWarning: 
examples.directory is deprecated; in the future, examples will be found relative to the 'datapath' directory.
  "found relative to the 'datapath' directory.".format(key))
/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/matplotlib/__init__.py:846: MatplotlibDeprecationWarning: 
The text.latex.unicode rcparam was deprecated in Matplotlib 2.2 and will be removed in 3.1.
  "2.2", name=key, obj_type="rcparam", addendum=addendum)
/Users/philippjfr/miniconda/envs/anacondaviz/lib/python3.6/site-packages/matplotlib/__init__.py:855: MatplotlibDeprecationWarning: 
examples.directory is deprecated; in the future, examples will be found relative to the 'datapath' directory.
  "found relative to the 'datapath' directory.".format(key))

But I can't figure out where they're coming from, we do load and ship a custom rc file but it specifies none of the options it's warning about.

@philippjfr
Copy link
Member

Nevermind I found it, the default rcparams in matplotlib still set these values. We use a context manager to temporarily override the options and when they are restored the warnings are generated.

@philippjfr
Copy link
Member

philippjfr commented Sep 23, 2018

Now fixed in #3013

@stonebig
Copy link
Contributor Author

stonebig commented Oct 6, 2018

I don't understand, I still have some with latest holoviews-1.11.0a6
image

@stonebig
Copy link
Contributor Author

stonebig commented Oct 6, 2018

unless it's an effect from previous packages tried in my notebook... checking

@stonebig
Copy link
Contributor Author

stonebig commented Oct 6, 2018

also the last one... something is wired, maybe it's matplotlib itself
image

@stonebig
Copy link
Contributor Author

stonebig commented Oct 6, 2018

reducing to my minimum I still have the issue... not sure where it's created
image

@stonebig
Copy link
Contributor Author

stonebig commented Oct 6, 2018

don't know exactly how to set a

warnings.filterwarnings("ignore", category=mpl.cbook.MatplotlibDeprecationWarning)

@stonebig
Copy link
Contributor Author

stonebig commented Oct 6, 2018

ok, workarounded in waiting of a better solution

import warnings
import matplotlib as mpl
# Holoviews
# for more example, see http://holoviews.org/Tutorials/index.html
import numpy as np
import holoviews as hv
hv.extension('matplotlib')
dots = np.linspace(-0.45, 0.45, 11)
fractal = hv.Image(image)

layouts = {y: (fractal * hv.Points(fractal.sample([(i,y) for i in dots])) +
               fractal.sample(y=y) )
            for y in np.linspace(0, 0.45,11)}
warnings.filterwarnings("ignore", category=mpl.cbook.MatplotlibDeprecationWarning)
hv.HoloMap(layouts, kdims=['Y']).collate().cols(2)

@philippjfr
Copy link
Member

I'll have another look, but I have mpl 3.0.0 and can't reproduce any warnings.

@philippjfr
Copy link
Member

Nevermind I can reproduce and I've got a fix.

@philippjfr
Copy link
Member

Merged that PR prematurely, still seeing those warnings.

@philippjfr
Copy link
Member

This one seems to have done it: #3058

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants