jupyterlab-themes icon indicating copy to clipboard operation
jupyterlab-themes copied to clipboard

Improve plotting for most dark themes

Open arbennett opened this issue 4 years ago • 3 comments

Currently light themes work well with plotting because axis text is legible. For most of these themes it seems that the plot background is not getting changed to something lighter. An example of a bad scheme (gruvbox-dark):

image

And the better behavior (nord):

image

arbennett avatar May 15 '20 06:05 arbennett

literally just type in your import section: from matplotlib import style

mpl.rcParams.update(mpl.rcParamsDefault)

it will make your plots look as such example

i think trying to bother with changing the plot axis label colors and backgrounds is maybe too much of a headache to solve for every color theme.

Plus most plots end up landing in powerpoint and you dont want to carry your rad theme over to a wider audience usually, so white bg, and black text is typically universal

dnzckn avatar Jul 20 '20 18:07 dnzckn

@arbennett I second the suggestion by @Deniz93. These themes are highly glorious in JupyterLab, but not so suitable if they carry over to reports, etc.

Though for me

import matplotlib as mpl
from matplotlib import style
mpl.rcParams.update(mpl.rcParamsDefault)

seems to override figsize choice when plt.show() is called.

b4rlw avatar Jan 22 '21 04:01 b4rlw

plt.style.use("dark_background") Maybe try this? there is also a context manager for it.

s-rog avatar Jan 29 '21 08:01 s-rog