mne-tools / mne-tools/mne-python
Browser figure ignores `matplotlib.rcParams["figure.figsize"]`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
I have another problem with the way MNE plotting works (or maybe it's just me doing things the wrong way). It seems like we ignore the figure.figsize RC parameter, so I can't e.g. customize the created figure size with this mechanism. Which BTW is pretty important, because it is used in Quarto as a cell option for example.
It seems like the only way to set the figure size (in this particular case) is via the MNE_BROWSE_RAW_SIZE environment variable. This can lead to surprising results, because it leads to non-reproducible results when this setting depends e.g. on the presence of an entry in the (hidden) MNE config file.
Would it be possible to somehow use matplotlib.rcParams["figure.figsize"] to control our browser figure size? I'm not sure if this problem also applies to other kinds of figures as well.
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.
Research direction
Start by tracing how browser figures are created and where MNE_BROWSE_RAW_SIZE is read, then compare that behavior with matplotlib.rcParams["figure.figsize"]. The change is complete when the browser figure can follow the rcParam without relying on hidden MNE configuration; the issue does not name a file or test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100