Scientific figures with Stylia
Sytlia is a small Python library for styling plots
Last updated
Was this helpful?
Sytlia is a small Python library for styling plots
Last updated
Was this helpful?
is a small package to stylize plots in Python so that they are publication-ready. Stylia provides modified axes (ax
) that can be used as drop-in replacements for Matplotlib axes.
First make sure that you have the Arial font installed in your computer (Linux systems do not have it preinstalled). The best is to install Arial in the conda environment you are using:
conda install -c conda-forge mscorefonts
You can read more about fonts and Matplotlib in this excellent from the Alexander Lab.
Stylia is constantly evolving, so we recommend that you install it directly from the .
SINGLE_COLUMN_WIDTH
: 90 mm or 3.54 in
TWO_COLOUMNS_WIDTH
: 180 mm or 7.09 in
These variables are built-in within Stylia. You can access them as follows:
FONTSIZE_SMALL
: 5
FONTSIZE
: 6
FONTSIZE_BIG
: 8
MARKERSIZE_SMALL
: 5
MARKERSIZE
: 10
MARKERSIZE_BIG
: 30
LINEWIDTH
: 0.5
LINEWIDTH_THICK
: 1.0
You can use predefined colors:
Available color names are:
'red'
'blue'
'green'
'orange'
'purple'
'yellow'
'gray'
'white'
'black'
Color maps can be created with the fit
method.
Available color maps are:
'spectral'
'viridis'
'coolwarm'
Discrete colormaps are work in progress
We follow the . Please read those style guidelines carefully. In brief, the entire figure should be have the following sizes:
Please note that, by default, we use . Non-scientific color maps look brighter, though. If you want to use non-scientific color maps, simply specify ContinuousColorMap("spectral", scientific=False)
.