Skip to content

Commit

Permalink
Do not set a default InlineBackend configuration in spyder kernels.
Browse files Browse the repository at this point in the history
This prevents user's matplotlib rc parameters from being clobbered when Spyder's "Activate support" is disabled. This makes sense because when disabled, a user should expect that Spyder does not interfere in any way.
  • Loading branch information
mrclary committed May 29, 2024
1 parent 76e39f9 commit fecd4fb
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions spyder_kernels/console/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,28 +93,6 @@ def kernel_config():
"del sys; del pdb"
)

# Default inline backend configuration.
# This is useful to have when people doesn't
# use our config system to configure the
# inline backend but want to use
# '%matplotlib inline' at runtime
spy_cfg.InlineBackend.rc = {
# 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.
'figure.figsize': (6.0, 4.0),
# 72 dpi matches SVG/qtconsole.
# This only affects PNG export, as SVG has no dpi setting.
'figure.dpi': 72,
# 12pt labels get cutoff on 6x4 logplots, so use 10pt.
'font.size': 10,
# 10pt still needs a little more room on the xlabel
'figure.subplot.bottom': .125,
# Play nicely with any background color.
'figure.facecolor': 'white',
'figure.edgecolor': 'white'
}

if is_module_installed('matplotlib'):
spy_cfg.IPKernelApp.matplotlib = "inline"

Expand Down

0 comments on commit fecd4fb

Please sign in to comment.