Skip to content

Remove matplotlib rc overrides. #14

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

Merged
merged 5 commits into from
May 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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