-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
PR: Fix issue where Spyder's inline graphics preferences were not applied #487
Conversation
ee46d3c
to
870f22d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrclary, sorry to say it but I think your current approach is not feasible (see below).
89dc88b
to
ccfb4a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks much better, thanks @mrclary!
…kend if necessary. Do not directly set rcParams or re-apply inline backend since doing either while in inline mode will prevent restoring rcParams when toggling to interactive mode. Rather, toggle the backend to interactive and back to inline. Note that when adding InlineBackend to kernel.config, it must be a Config object.
…ne method _set_inline_config_option.
… there were any rc changes. Rather than condition on pylab autoload in the configuration, condition on it being true.
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.
Co-authored-by: Carlos Cordoba <[email protected]>
Apply rcParams explicitly while in inline mode. Always reset rcParams to file defaults before applying backend. This will ensure correct rcParams in interactive backends if rcParams are explicitly set in inline mode. When changing to inline mode, InlineBackend settings will be applied to rcParams.
Co-authored-by: Carlos Cordoba <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now, thanks @mrclary!
This fixes an issue where:
rcParams
are over-written by Spyder's inline preferences even with the preference set for an interactive backend.For more detail, see spyder-ide/spyder#22034.