Plotting variables: `getvars` access & more flexible `setvars`
@sadielbartholomew is already working on this.
Since Apr 7, 2025.
- Dominant language
- Python
- Stars
- 21
- Forks
- 11
- Avg merge
- 7h 11m
- Merged PRs (30d)
- 1
Description
Currently we have a function setvars which can be used to set plotting variables. However, there is no direct user-facing way to access/view those stored plotting variables to see what is defined, which is particularly unhelpful when any future call to setvars will reset any values set back to the defaults, and we may want to retain anything set to non-default values (such as in the test suite, where I have a decorator to store the output plot under a certain name to enable image-based comparison but test often call setvars themselves - though it will be useful for many common user-aligned reasons I can foresee as well).
So, we should make it easy to both:
- access/get the set plotting variables, notably with a function
getvarsanalogous tosetvarsto return them as a dictionary; and - set new plotting variables with
setvarswithout setting anything not input there to the default i.e. editing any variables defined in the call without changing any other values.
(1) is priority since the latter could be achieved by inputting the former as kwargs to setvars along with any values to change, but that is a bit clunky as the ideal overall solution to (2).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.