-
Notifications
You must be signed in to change notification settings - Fork 224
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
Resetting default GMT parameters - pygmt.config #486
Comments
GMT has a pygmt/pygmt/tests/test_config.py Lines 35 to 36 in 0fc2e94
Alternatively, there might be a way to 'store' a global list of all the configurations a user has made and reuse some part of the Lines 180 to 186 in 0fc2e94
|
I think things is a little different after we bump to GMT>6.1. In GMT 6.1, the GMT settings also have a hierarchical level. Each session, figure and subplot all can have its own configurations. |
I think you're right.
Yes, it's possible to have a So, perhaps we can have
Or we can ask an upstream feature request to allow |
Description of the desired feature
The
pygmt.config
class/context manager allows the user to permanently or temporarily override default GMT config parameters. If a parameter is set permanently (particularly in a notebook), it would be useful to be able to reset back to the default without having to reset the kernel / usepygmt.config
as a context manager. Motivated by #482 (comment)Are you willing to help implement and maintain this feature? Yes
I've been able to override and reset everything myself by terminating and restarting the global session:
but this is obviously not ideal, and I fear this may have unintended consequences of which I'm ignorant. I see this feature more as something to facilitate figure development in a notebook, but not so much for finalised figure scripts/notebooks, so it's perhaps not a huge issue?
Ideal usage would be something like:
I'm still familiarising myself with the inner workings, so I apologise if I've missed/misunderstood something important.
The text was updated successfully, but these errors were encountered: