Skip to content

No MatplotlibDeprecationWarning for default rcParams #13118

Closed
@koki-sato

Description

@koki-sato

Bug report

Bug summary

I get MatplotlibDeprecationWarning when putting the default rcParams copied by matplotlib.rcParams.copy() into matplotlib.rcParams.update().

Code for reproduction

>>> import matplotlib
>>> matplotlib.__version__
'3.0.2'
>>> rc_params = matplotlib.rcParams.copy()
>>> matplotlib.rcParams.update(rc_params)
/Users/xxxx/.local/share/virtualenvs/xxxx/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/xxxx/.local/share/virtualenvs/xxxx/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)

It is because matplotlib.rcParams.copy() returns dictionary of rcParams and it includes deprecated rcParams like examples.directory and text.latex.unicode. However, examples.directory and text.latex.unicode are included in the default rcParams of matplotlib.

Expected outcome

Do not show MatplotlibDeprecationWarning for default rcParams.

Matplotlib version

  • Operating system: macOS Sierra 10.12.6
  • Matplotlib version: 3.0.2
  • Matplotlib backend: Agg
  • Python version: 3.6.5
  • Jupyter version (if applicable):
  • Other libraries:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions