Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving a figure as image has some style issues #235

Open
Chris-N-K opened this issue Nov 28, 2023 · 1 comment
Open

Saving a figure as image has some style issues #235

Chris-N-K opened this issue Nov 28, 2023 · 1 comment
Labels
Bug Something isn't working Styling Related to the visual appearance of the widget

Comments

@Chris-N-K
Copy link
Contributor

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.

@dstansby dstansby added the Bug Something isn't working label Jan 7, 2024
@dstansby dstansby added the Styling Related to the visual appearance of the widget label Jan 15, 2024
@Chris-N-K
Copy link
Contributor Author

A small update for this issue.
The changes introduced in 2.0.0 change the way to implement a solution slightly different.
At the moment the background needs to be transparent as a coloured background introduces some issues (no background updates upon redraw).
Therefore, constant colouring for savefig could be added to the style_sheet_from_theme utility function for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Styling Related to the visual appearance of the widget
Projects
None yet
Development

No branches or pull requests

2 participants