Skip to content

Commit

Permalink
Merge pull request #14 from fperez/master
Browse files Browse the repository at this point in the history
Remove matplotlib rc overrides.

Addresses:
- ipython/ipython#10383
- matplotlib/matplotlib#23007
  • Loading branch information
fperez committed May 20, 2022
2 parents 10234a6 + 4d46022 commit 170a075
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions matplotlib_inline/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,19 @@ class InlineBackendConfig(SingletonConfigurable):
class InlineBackend(InlineBackendConfig):
"""An object to store configuration of the inline backend."""

# The typical default figure size is too large for inline use,
# so we shrink the figure size to 6x4, and tweak fonts to
# make that fit.
# While we are deprecating overriding matplotlib defaults out of the
# box, this structure should remain here (empty) for API compatibility
# and the use of other tools that may need it. Specifically Spyder takes
# advantage of it.
# See https://github.com/ipython/ipython/issues/10383 for details.
rc = Dict(
{
'figure.figsize': (6.0, 4.0),
# play nicely with white background in the Qt and notebook frontend
'figure.facecolor': (1, 1, 1, 0),
'figure.edgecolor': (1, 1, 1, 0),
# 12pt labels get cutoff on 6x4 logplots, so use 10pt.
'font.size': 10,
# 72 dpi matches SVG/qtconsole
# this only affects PNG export, as SVG has no dpi setting
'figure.dpi': 72,
# 10pt still needs a little more room on the xlabel:
'figure.subplot.bottom': .125
},
help="""Subset of matplotlib rcParams that should be different for the
inline backend."""
).tag(config=True)
{},
help="""Dict to manage matplotlib configuration defaults in the inline
backend. As of v0.1.4 IPython/Jupyter do not override defaults out of
the box, but third-party tools may use it to manage rc data. To change
personal defaults for matplotlib, use matplotlib's configuration
tools, or customize this class in your `ipython_config.py` file for
IPython/Jupyter-specific usage.""").tag(config=True)

figure_formats = Set(
{'png'},
Expand Down

0 comments on commit 170a075

Please sign in to comment.