Skip to content

Conversation

@drammock
Copy link
Member

this makes it so that plot_projs_topomap uses the same sized head for EEG and MEG subplots within a figure (unless user passes their own axes). It's a quick fix to make the docs look nicer before release; was mentioned in #8640

cc @hoechenberger @mmagnuski

Not sure if there are other places in the codebase where we want to do this?

@mmagnuski
Copy link
Member

Looks good!

@hoechenberger
Copy link
Member

Doc artifact: https://24068-1301584-gh.circle-artifacts.com/0/dev/auto_tutorials/preprocessing/plot_50_artifact_correction_ssp.html#repairing-ecg-artifacts-with-ssp

Looks much better now!

@drammock The "compat" CI run fails:

2020-12-12T00:22:39.5146016Z =================================== FAILURES ===================================
2020-12-12T00:22:39.5146681Z ___________________________ test_plot_projs_topomap ____________________________
2020-12-12T00:22:39.5147493Z mne/viz/tests/test_topomap.py:111: in test_plot_projs_topomap
2020-12-12T00:22:39.5153346Z     plot_projs_topomap(projs, info=info, colorbar=True, **fast_test)
2020-12-12T00:22:39.5154340Z mne/viz/topomap.py:354: in plot_projs_topomap
2020-12-12T00:22:39.5155007Z     ax.sharex(axes[0])
2020-12-12T00:22:39.5156421Z E   AttributeError: 'AxesSubplot' object has no attribute 'sharex'

Do you think you could address the issue with the seemingly cropped figures, too?

@drammock
Copy link
Member Author

@drammock The "compat" CI run fails:

argh, yeah, looks like using sharex after axes creation was only added in MPL 3.3.0. I'll have to see if there's a way to do it at creation time that doesn't break other plot types (it uses shared _prepare_trellis code).

Do you think you could address the issue with the seemingly cropped figures, too?

I haven't yet had a chance to dig into why this is happening in sphinx but not in interactive plotting (probably a backend difference? I've at least ruled out the idea that sphinx-gallery was secretly calling tight_layout...). Separate PR, but sadly I'm off for the next 5 days or so, so might not make the 0.22 release unless someone else looks into it.

@larsoner larsoner added this to the 0.22 milestone Dec 14, 2020
@larsoner larsoner closed this Dec 14, 2020
@larsoner larsoner reopened this Dec 14, 2020
@larsoner larsoner merged commit 5d7ddd2 into mne-tools:master Dec 14, 2020
larsoner added a commit to agramfort/mne-python that referenced this pull request Dec 16, 2020
* upstream/master: (42 commits)
  MRG, ENH: Add DICS bias tests (mne-tools#8610)
  MRG, BUG, ENH: Add window option (mne-tools#8662)
  BUG: Fix alpha for volumes (mne-tools#8663)
  MRG, BUG: Fix bugs with envcorr (mne-tools#8658)
  MRG, ENH: Progressbar for csd_morlet (mne-tools#8608)
  Render is necessary now (mne-tools#8657)
  VIZ: Fix head size (mne-tools#8651)
  MRG, MAINT: bump sphinxcontrib-bitex version (mne-tools#8653)
  MRG, MAINT: Improve server env (mne-tools#8656)
  BUG: Mayavi center (mne-tools#8644)
  VIZ, ENH: allow show/hide annotations by label (mne-tools#8624)
  Add regression test for EEGLAB data with a chanlocs struct (mne-tools#8647)
  FIX: scalar_bar (mne-tools#8643)
  MRG: Small fix to tutorial; rename plot_events ordinate label to "Event id"; improve some SSP docstrings (mne-tools#8612)
  MRG, ENH: make plot alignment use defaults for colors (mne-tools#8553)
  BUG: Fix passing of channel type (mne-tools#8638)
  FIX: fixed loop over norm PSF/CTF options (mne-tools#8636)
  MRG, BUG: Pass kwargs (mne-tools#8630)
  DOC: Clearer error message (mne-tools#8631)
  BUG: Fix number of labels (mne-tools#8629)
  ...
larsoner added a commit to wmvanvliet/mne-python that referenced this pull request Dec 16, 2020
* upstream/master: (38 commits)
  MRG, ENH: Add DICS bias tests (mne-tools#8610)
  MRG, BUG, ENH: Add window option (mne-tools#8662)
  BUG: Fix alpha for volumes (mne-tools#8663)
  MRG, BUG: Fix bugs with envcorr (mne-tools#8658)
  MRG, ENH: Progressbar for csd_morlet (mne-tools#8608)
  Render is necessary now (mne-tools#8657)
  VIZ: Fix head size (mne-tools#8651)
  MRG, MAINT: bump sphinxcontrib-bitex version (mne-tools#8653)
  MRG, MAINT: Improve server env (mne-tools#8656)
  BUG: Mayavi center (mne-tools#8644)
  VIZ, ENH: allow show/hide annotations by label (mne-tools#8624)
  Add regression test for EEGLAB data with a chanlocs struct (mne-tools#8647)
  FIX: scalar_bar (mne-tools#8643)
  MRG: Small fix to tutorial; rename plot_events ordinate label to "Event id"; improve some SSP docstrings (mne-tools#8612)
  MRG, ENH: make plot alignment use defaults for colors (mne-tools#8553)
  BUG: Fix passing of channel type (mne-tools#8638)
  FIX: fixed loop over norm PSF/CTF options (mne-tools#8636)
  MRG, BUG: Pass kwargs (mne-tools#8630)
  DOC: Clearer error message (mne-tools#8631)
  BUG: Fix number of labels (mne-tools#8629)
  ...
@drammock drammock deleted the fix-head-size branch December 29, 2020 16:53
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.

4 participants