matplotlib / matplotlib/ipympl

Implement needs_background metadata

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

Nobody has claimed this yet.

enhancement
Dominant language
Jupyter Notebook
Stars
1.7k
Forks
234
PR merge metrics
No merged PRs in 30d

Description

Describe the issue

The matplotlib-inline backend provides the needs_background metadata which allows to force a light background under plot images to improve readability when using a JupyterLab dark theme. We should probably implement the same for the static image.

See https://github.com/ipython/matplotlib-inline/blob/541b26da2f49d0403994b91cb062e8c438920c44/matplotlib_inline/backend_inline.py#L226-L239

This will not work for the widget repr, but we could probably implement custom logic to mimick this behavior with the widget view.

Contributor guide

Open the 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.

Research direction

Read the referenced matplotlib_inline/backend_inline.py implementation at lines 226-239, then inspect ipympl's static image path and widget view. Implement the needs_background metadata behavior for static images; the issue notes that widget repr behavior may need separate custom logic.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.