matplotlib / matplotlib/napari-matplotlib

Saving a figure as image has some style issues

Open
#235 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Styling
Dominant language
Python
Stars
46
Forks
24
PR merge metrics
No merged PRs in 30d

Description

When saving a figure as image while using the dark theme the style poses some problems. The axe ticks and labels remain coloured light grey as stated by the style sheet, but this makes them nearly invisible in the saved image.

I would suggest to either use a non-transparent facecolor (napari theme background) or add specific colouring for savefig to the style sheet: `figure.facecolor : 262930` or `savefig.facecolor : 262930`

Another solution would be to change the colours for the axes, ticks and labels for saving, but as far as I know this can't be achieved through matplotlib without changing the colours of the displayed figure as well.

Contributor guide

No contributing guide indexed for this repository

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

No file or test is named. Start by reproducing a dark-theme figure save and inspect the save-to-image path alongside the theme stylesheet. Done means saved images have readable axes ticks and labels without making the displayed figure's styling incorrect.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization
Issue type
Bug
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.