arviz-devs / arviz-plots

ArviZ modular plotting
https://arviz-plots.readthedocs.io
Apache License 2.0
3 stars 2 forks source link

Do we want a dark theme? #89

Open aloctavodia opened 2 months ago

aloctavodia commented 2 months ago

It is not a high priority, so I am leaving this template here.

One issue is that for many plots we have black or grays as defaults. So if the user use a dark style like this, plots may not look good.

***

FIGURE

***

figure.facecolor: black # broken white outside box figure.edgecolor: None # broken white outside box figure.titleweight: bold # weight of the figure title figure.titlesize: 18

figure.figsize: 6, 5 figure.dpi: 200.0 figure.constrained_layout.use: True

***

FONT

***

font.style: normal font.variant: normal font.weight: normal font.stretch: normal

text.color: .85

***

AXES

***

axes.facecolor: 0.05 axes.edgecolor: black # axes edge color axes.linewidth: 0.8 # edge line width

axes.grid: False # do not show grid

axes.grid.axis: y # which axis the grid should apply to

axes.grid.which: major # grid lines at {major, minor, both} ticks axes.axisbelow: True # keep grid layer in the back

grid.color: .2 # grid color grid.linestyle: - # solid grid.linewidth: 0.8 # in points grid.alpha: 1.0 # transparency, between 0.0 and 1.0

lines.solid_capstyle: round

axes.spines.right: False # do not show right spine axes.spines.top: False # do not show top spine

axes.titlesize: 16 axes.titleweight: bold # font weight of title

axes.labelsize: 14 axes.labelcolor: .85 axes.labelweight: normal # weight of the x and y labels

color-blind friendly cycle designed using https://colorcyclepicker.mpetroff.net/

see preview and check for colorblindness here https://coolors.co/008b92-f15c58-48cdef-98d81a-997ee5-f5dc9d-c90a4e-145393-ffffff-616161

axes.prop_cycle: cycler(color=["008b92", "f15c58", "48cdef", "98d81a", "997ee5", "f5dc9d", "c90a4e", "145393", "ffffff", "616161"])

image.cmap: viridis

***

TICKS

***

xtick.labelsize: 14 xtick.color: .85 xtick.top: False xtick.bottom: True xtick.direction: out

ytick.labelsize: 14 ytick.color: .85 ytick.left: True ytick.right: False ytick.direction: out

***

LEGEND

***

legend.framealpha: 0.5 legend.frameon: False # do not draw on background patch legend.fancybox: False # do not round corners

legend.numpoints: 1 legend.scatterpoints: 1

legend.fontsize: 14

imperorrp commented 2 months ago

Having a dark theme sounds nice. Maybe we could switch the default colors based on theme for the plot artists

aloctavodia commented 2 months ago

Right, to do so, we will need to read the colors from the template, style sheet.