Docs: plotting examples should capture returned fig/ax and not close figures

Open
#719 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
66/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
documentation

Research direction

Start with the docstring_todos_20260312.md checklist referenced in the issue and locate the listed method docstrings in the Pyleoclim package. Update each plotting example to capture returned figure and axes objects, use axs for the dict-like axes in GeoSeries.map, and remove the figure-closing calls. Done means all listed examples follow the conventions and display their plots in the documentation.

Written by the indexing model from the issue text.

Description

documentation

Part of #689 (checklist docstring_todos_20260312.md). Line numbers in that checklist have drifted, so items are listed by method.

Following the convention fig, ax = obj.plot() in docstring examples:

Examples that don't capture the returned objects

  • Coherence.plot (coh.plot(), coh_sig.plot())
  • Coherence.dashboard (coh_sig.dashboard())
  • Coherence.signif_test (coh_sig.plot(), coh_sig2.plot())
  • GlobalCoherence.signif_test (gcoh_sig.plot())
  • GlobalCoherence.plot (gcoh.plot())
  • EnsembleSeries.correlation (corr_res.plot())
  • GeoSeries.segment (mgs.plot())
  • MultipleGeoSeries class docstring (Euro2k.map())
  • MultipleGeoSeries.map (Euro2k.map())
  • MultipleGeoSeries.pca (res.modeplot(), res.screeplot()); also split the two plots into separate cells
  • MultipleSeries.spectral (ms_psd.plot())
  • PSD.plot (psd_sim.plot())
  • Resolution.plot, Resolution.histplot, Resolution.dashboard
  • Series.wavelet_coherence (coh.plot(), coh_wwz.plot(), cwt_sig.dashboard())
  • Series.global_coherence (gcoh.plot())
  • Series.resolution (resolution.dashboard(), .histplot(), .plot())

Dict-like axes captured as ax; use axs

  • GeoSeries.map: three examples (fig, ax = ts.map(...))

Examples that close figures (hides the output in the docs)

  • Series.plot: ...; pyleo.closefig(fig)
  • Series.summary_plot: pyleo.closefig(fig)
Dominant language
Python
Stars
104
Forks
36
Avg merge
1d 7h
Merged PRs (30d)
5

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LinkedEarth/Pyleoclim_util

All issues in LinkedEarth/Pyleoclim_util

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.