Skip to content

Commit 3520fae

Browse files
committed
Add styling libraries and figures for amazing plots
1 parent 0fdc7a6 commit 3520fae

11 files changed

+2479
-22
lines changed

Styling Libraries for Amazing Plots/Matplotlib_styles.ipynb

Lines changed: 104 additions & 22 deletions
Large diffs are not rendered by default.
Loading
Loading
Loading
Loading
Loading
Loading
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Gruvbox-Dark matplotlib style
2+
# Hacked together by Emil Rivera-Thorsen
3+
# Based on Héloïse Stevance's blog post:
4+
# https://www.hfstevance.com/blog/2019/7/22/matplotlib-style
5+
# and the gruvbox color scheme by Pavel Pertsev:
6+
# https://github.com/morhetz/gruvbox
7+
# To check more avaialble customization options see:
8+
# https://matplotlib.org/tutorials/introductory/customizing.html
9+
10+
text.color : fbf1c7 # Non-quoted hex code
11+
12+
# FIGURE
13+
figure.facecolor : 282828
14+
figure.figsize : 7, 4 # Adjust according to dpi and your software
15+
figure.dpi : 200 # I have a HiDPI laptop. You may want to change this.
16+
17+
# AXES
18+
axes.titlesize : 14
19+
axes.labelsize : 12
20+
axes.edgecolor : fbf1c7
21+
axes.facecolor : 32302f
22+
axes.labelcolor : fbf1c7
23+
axes.linewidth : 0.75
24+
axes.spines.top : False
25+
axes.spines.right : False
26+
axes.spines.bottom : True
27+
axes.spines.left : True
28+
29+
# FONTS
30+
font.family : serif
31+
font.serif : Palatino
32+
33+
# GRID
34+
axes.grid : True
35+
grid.alpha : 0.93
36+
grid.color : 504945
37+
grid.linestyle : :
38+
grid.linewidth : 0.8
39+
40+
## Alternative grid style:
41+
# grid.linestyle : -
42+
# grid.color : 282828
43+
# grid.linewidth : 1.
44+
45+
# LINES
46+
axes.prop_cycle : cycler('color', ['b8bb26', 'fabd2f', '83a598', 'd3869b', 'fe8019', '8ec07c', 'a89984', 'fb4934']) #hex colours quoted here for some reason
47+
lines.linewidth : 1.3
48+
lines.markeredgecolor : 'none'
49+
50+
# SCATTER PLOT
51+
scatter.marker : .
52+
53+
# TICKS
54+
xtick.top : False
55+
ytick.right : False
56+
57+
xtick.labelsize : 10
58+
xtick.color : fbf1c7
59+
xtick.direction : out
60+
ytick.labelsize : 10
61+
ytick.color : fbf1c7
62+
ytick.direction : out
63+
64+
65+
# FIGURE OUTPUT
66+
savefig.dpi : 300 # Minimum bitmap resolution required by most journals.
67+
68+

0 commit comments

Comments
 (0)