panoptic-labs / research

At Panoptic, we recognize the power of open source code in promoting research integrity and collaboration. We strive to maintain a transparent work environment that allows us all to learn from each other's findings by sharing our coding projects through GitHub - creating an enriched experience for everyone involved!
https://www.panoptic.xyz/
69 stars 10 forks source link

Create matplotlib style sheets #2

Open guil-lambert opened 1 year ago

guil-lambert commented 1 year ago

We must create style sheets to make sure all graphs+figures look the same when generated on different computers.

We may also need to create style sheets that correspond to specific aspect ratios: 16:9, 7:8, 4:7, and 2:1 https://influencermarketinghub.com/twitter-image-size/

I am attaching a sample style sheet here, to be loaded using: plt.style.use("./panoptic-dark.mplstyle")


# default seaborn aesthetic
# darkgrid + deep palette + notebook context

axes.axisbelow: True
axes.edgecolor: 0.05
axes.facecolor: 0A0119
axes.grid: True
axes.grid.axis: both 
axes.grid.which: major
axes.labelcolor: .95
axes.labelsize: 6
axes.labelweight : light
axes.labelpad: 3.0 
axes.linewidth: 0.5
axes.prop_cycle: cycler('color', ['9C72E5', '72BBE5', 'E572BB', 'E5E5E5', '72E59A'])
axes.titlesize: 7
axes.spines.left: False  ## display axis spines
axes.spines.bottom: False
axes.spines.top: False
axes.spines.right: False
axes.autolimit_mode: round_numbers

#figure.facecolor: 0.1
figure.facecolor: 19161E
#figure.figsize: 3.15, 1.8      # 4:7, 1181x675
figure.figsize: 3.2, 2.8  # 7:8, 1200x1050
#figure.figsize: 3.2, 1.8    # 16:9, 1200x675
#figure.figsize: 3.6, 1.8    # 2:1, 1350x675
figure.dpi         : 375
figure.constrained_layout.w_pad:  0.2 
figure.constrained_layout.h_pad:  0.2
figure.constrained_layout.use: True
figure.subplot.left:   0.1
figure.subplot.right:  0.9
figure.subplot.wspace: 0.2
figure.subplot.hspace: 0.2

font.family: sans-serif
font.sans-serif: Helvetica Neue, HelveticaNeue, Arial, Liberation Sans, DejaVu Sans, Bitstream Vera Sans, sans-serif
font.weight  : light

grid.color: 0.25
grid.linestyle: -
grid.linewidth: 0.375

image.cmap: BuPu

legend.loc: best
legend.fontsize: 5
legend.frameon: True
legend.borderpad: 0.25
legend.edgecolor: 0.75
legend.facecolor: inherit
legend.labelspacing: 0.25
legend.numpoints: 1
legend.scatterpoints: 1
legend.framealpha: 1
legend.fancybox: True 

lines.linewidth: 0.5
lines.markeredgewidth: 0.25
lines.marker          : None
lines.markersize: 2
lines.solid_capstyle: round
lines.solid_joinstyle: round
lines.dash_joinstyle: round
lines.dash_capstyle: round
lines.dashed_pattern : 3.7, 1.6

patch.facecolor: 6E4EAF
patch.linewidth: .3

text.color: .95

xtick.top           : False  ## draw ticks on the top side
xtick.bottom        : True
xtick.labeltop      : False   ## draw label on the top
xtick.labelbottom   : True    ## draw label on the bottom
xtick.color: .95
xtick.direction: out
xtick.labelsize: 4
xtick.major.pad: 3
xtick.major.size: 0
xtick.major.width: 0
xtick.minor.size: 0
xtick.minor.width: 0

xaxis.labellocation: right  # alignment of the xaxis label: {left, right, center}
yaxis.labellocation: center  # alignment of the yaxis label: {bottom, top, center}

ytick.left          : False    ## draw ticks on the left side
ytick.right         : True   ## draw ticks on the right side
ytick.labelleft     : False    ## draw tick labels on the left side
ytick.labelright    : True   ## draw tick labels on the right side
ytick.color: .95
ytick.direction: out
ytick.labelsize: 4
ytick.major.pad: 3
ytick.major.size: 0
ytick.major.width: 0
ytick.minor.size: 0
ytick.minor.width: 0

errorbar.capsize : 0.25  ## length of end cap on error bars in pixels

path.simplify : True

svg.fonttype : none
guil-lambert commented 1 year ago

Added style sheets to this commit: 020cbfcf50a0e39c6b9ce512d444ed34b9d45d91