Skip to content

Conversation

@mscheltienne
Copy link
Member

@mscheltienne mscheltienne commented Oct 2, 2023

Closes #12024

Bump the minimum requirement for matplotlib to 3.5.0, which supports the recommended layout="constrained" argument and which will be out for 2 years on the 16th of November.

  • Get CIs green
  • eradicate subplots_adjust
  • Run [circle full]
  • Visual inspection

@mscheltienne mscheltienne marked this pull request as draft October 2, 2023 19:39
@larsoner
Copy link
Member

larsoner commented Oct 5, 2023

Last I think is to eradicate subplots_adjust in favor of layout="constrained" in examples, then this should be good to go

@larsoner
Copy link
Member

larsoner commented Oct 6, 2023

Looking briefly through the docs (e.g., main vs PR) I think what we now need to fix aesthetically are:

  1. evoked.plot_topomap:

    image

  2. evoked.plot_joint

    image

I'll see if these are easy enough to fix. I'm a bit wary since these bits of code are complicated but we'll see 🤞

@larsoner
Copy link
Member

larsoner commented Oct 6, 2023

@larsoner larsoner marked this pull request as ready for review October 6, 2023 20:40
@drammock
Copy link
Member

drammock commented Oct 7, 2023

Looks good!

spectrum = epochs["visual/right"].compute_psd()
spectrum.plot_topomap()

in this tutorial looks wonky, and the x axis title is getting cut off by the bottom edge of the figure in the immediately prior plot on that same page.

Let's handle those in a follow-up PR (along with whatever else we notice in the coming weeks)

@drammock drammock merged commit fdaeb86 into mne-tools:main Oct 7, 2023
@mscheltienne mscheltienne deleted the layout branch October 8, 2023 21:06
larsoner added a commit to larsoner/mne-python that referenced this pull request Oct 10, 2023
* upstream/main: (37 commits)
  Use constrained layout in matplotlib visualization (mne-tools#12050)
  Add raw stc (mne-tools#12001)
  [MRG] update codeowners (mne-tools#12089)
  DOC: Morlet wavelet length in tfr_morlet (mne-tools#12073)
  BUG: Fix bug with mne browser backend (mne-tools#12078)
  Cache avatars (mne-tools#12077)
  BUG: Fix bug with ch_name resolution (mne-tools#12086)
  add unicode roundtrip for FIF (mne-tools#12080)
  add Ivan to names.inc (mne-tools#12081)
  MAINT: Work around PySide 6.5.3 event loop error (mne-tools#12076)
  mne-tools#11608, buggfix and docstring update (mne-tools#12066)
  MAINT: Fix broken examples (mne-tools#12074)
  Add UI Event linking to DraggableColorbar (mne-tools#12057)
  handle lazy loading through .pyi type stubs (mne-tools#12072)
  BUG: Fix bug with sensor_colors (mne-tools#12068)
  clean  up some deprecations (mne-tools#12067)
  Allow not dropping bads when creating or plotting Spectrum objs (mne-tools#12006)
  Collapsible html repr for raw/info (mne-tools#12064)
  BUG: Fix bug with pickling MNEBadsList (mne-tools#12063)
  add details for Denis (mne-tools#12065)
  ...
snwnde pushed a commit to snwnde/mne-python that referenced this pull request Mar 20, 2024
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: Switch to constrained layout in figure creation

3 participants