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

rename arviz-doc to arviz-docgrid and make arviz-doc a non-grid style #2157

Merged
merged 2 commits into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions arviz/plots/styles/arviz-doc.mplstyle
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,9 @@ axes.facecolor: white
axes.edgecolor: .33 # axes edge color
axes.linewidth: 0.8 # edge line width

axes.grid: True # show grid
# axes.grid.axis: y # which axis the grid should apply to
axes.grid.which: major # grid lines at {major, minor, both} ticks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep this? Without explicitly setting axes.grid.which to "major", the axis will show both major and minor. I like things more simple and less clutterry, which is what I was hoping this style goes for.

I think the only differentiator between arviz-doc and arviz-docgrid is the presence of the grid. Even with arviz-doc style applied, you can override the grid visibility by applying plt.grid(). If the user happens to do that, then I want it to match arviz-docgrid's style to a tee.

axes.grid: False # do not show grid
axes.axisbelow: True # keep grid layer in the back

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep these too for the same reason above?

lines.solid_capstyle: round

axes.spines.right: False # do not show right spine
Expand Down
88 changes: 88 additions & 0 deletions arviz/plots/styles/arviz-docgrid.mplstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
## ***************************************************************************
## * FIGURE *
## ***************************************************************************

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

figure.figsize: 11.5, 5
figure.dpi: 300.0
figure.constrained_layout.use: True

## ***************************************************************************
## * FONT *
## ***************************************************************************

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

text.color: .15

## ***************************************************************************
## * AXES *
## ***************************************************************************

axes.facecolor: white
axes.edgecolor: .33 # axes edge color
axes.linewidth: 0.8 # edge line width

axes.grid: True # 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: .8 # 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: .15
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/107591-00c0bf-f69a48-fdcd49-8da798-a19368-525252-a6761d-7035b7-cf166e
axes.prop_cycle: cycler(color=['107591','00c0bf','f69a48','fdcd49','8da798','a19368','525252','a6761d','7035b7','cf166e'])

image.cmap: viridis

## ***************************************************************************
## * TICKS *
## ***************************************************************************

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

ytick.labelsize: 14
ytick.color: .15
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