Skip to content
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

make modifications of matplotlib configuration on a local level #26

Open
camelCaseNick opened this issue May 10, 2022 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@camelCaseNick
Copy link

In order to not interfere with other potential components relying on matplotlib and implicitly expecting some or all configurations, namely rcParams, to have their respective default value, I would appreciate if changes to rcParams only influenced july.

Currently, it is reconfigured globally in

mpl.rcParams.update(rcmod)

One possibility to achieve this would be for update_rcparams to use matplotlib.rc_context – returning a new independent context manager, to be used in

update_rcparams(**kwargs)

@e-hulten
Copy link
Owner

Sorry for the late reply. Very good suggestion, I fully agree!

The next version of july will be using the

with plt.rc_context(rcmod): 
    ...

context manager to avoid interfering with other plots and packages.

@e-hulten e-hulten self-assigned this Sep 21, 2022
@e-hulten e-hulten added the bug Something isn't working label Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants