Style Reference
FigRecipe supports customizable styles for publication-ready figures. This page documents the style parameters and their defaults.
Style Anatomy
The following diagram shows all configurable style parameters on a figure:
SciTeX style anatomy — all configurable parameters annotated on six plot types.
Style Parameters
Figure Settings
Parameter |
Default |
Description |
|---|---|---|
|
300 |
Output resolution in dots per inch |
|
Default output format (png, pdf, svg) |
|
|
white |
Figure background color |
Axes Settings
Parameter |
Default |
Description |
|---|---|---|
|
[40, 28] |
Default axes size in millimeters [width, height] |
|
0.2 |
Axes border thickness in mm |
Labels and Title
Parameter |
Default |
Description |
|---|---|---|
|
8 |
Title font size in points |
|
4 |
Title padding from axes in points |
|
7 |
Axis label font size in points |
|
2 |
Axis label padding in points |
Ticks
Parameter |
Default |
Description |
|---|---|---|
|
7 |
Tick label font size in points |
|
0.8 |
Major tick length in mm |
|
0.2 |
Tick line width in mm |
|
out |
Tick direction (in, out, inout) |
|
3-4 |
Target number of major ticks per axis |
|
0.25 |
Minor tick label color (gray value) |
Lines and Markers
Parameter |
Default |
Description |
|---|---|---|
|
0.12 |
Default line width in mm |
|
0.8 |
Default marker size in mm |
|
none |
Marker edge style |
Legend
Parameter |
Default |
Description |
|---|---|---|
|
6 |
Legend font size in points |
|
false |
Whether to show legend frame |
Spines
Parameter |
Default |
Description |
|---|---|---|
|
0.2 |
Spine line width in mm |
|
[bottom, left] |
Which spines are visible (top/right hidden by default) |
Grid
Parameter |
Default |
Description |
|---|---|---|
|
false |
Whether to show grid |
|
– |
Grid line style |
|
0.5 |
Grid line width |
|
0.25 |
Grid color (gray value) |
Loading Styles
Python API
import figrecipe as fr
# Load a preset style
fr.load_style("SCITEX")
# List available presets
presets = fr.list_presets()
print(presets)
# Unload style (return to matplotlib defaults)
fr.unload_style()
Available Presets
default- Basic clean styleSCITEX- Publication-ready scientific style (recommended)SCITEX_DARK- Dark mode variant
Custom Styles
You can create custom styles by providing a dictionary:
custom_style = {
"figure": {
"dpi": 300,
"facecolor": "white",
},
"axes": {
"linewidth_mm": 0.3,
},
"fonts": {
"title_pt": 10,
"axis_label_pt": 8,
},
"ticks": {
"direction": "in",
"length_mm": 1.0,
},
}
fr.load_style(custom_style)