From fecd4fb72c75d872b1d2514e47d5e0a5ca738fff Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Fri, 17 May 2024 16:25:38 -0700 Subject: [PATCH] Do not set a default InlineBackend configuration in spyder kernels. 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. --- spyder_kernels/console/start.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/spyder_kernels/console/start.py b/spyder_kernels/console/start.py index eb910305..600b656c 100644 --- a/spyder_kernels/console/start.py +++ b/spyder_kernels/console/start.py @@ -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"