figrecipe 0.5.0__py3-none-any.whl → 0.7.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- figrecipe/__init__.py +220 -819
- figrecipe/_api/__init__.py +48 -0
- figrecipe/_api/_extract.py +108 -0
- figrecipe/_api/_notebook.py +61 -0
- figrecipe/_api/_panel.py +46 -0
- figrecipe/_api/_save.py +191 -0
- figrecipe/_api/_seaborn_proxy.py +34 -0
- figrecipe/_api/_style_manager.py +153 -0
- figrecipe/_api/_subplots.py +333 -0
- figrecipe/_api/_validate.py +82 -0
- figrecipe/_dev/__init__.py +29 -0
- figrecipe/_dev/_plotters.py +76 -0
- figrecipe/_dev/_run_demos.py +56 -0
- figrecipe/_dev/demo_plotters/__init__.py +64 -0
- figrecipe/_dev/demo_plotters/_categories.py +81 -0
- figrecipe/_dev/demo_plotters/_figure_creators.py +119 -0
- figrecipe/_dev/demo_plotters/_helpers.py +31 -0
- figrecipe/_dev/demo_plotters/_registry.py +50 -0
- figrecipe/_dev/demo_plotters/bar_categorical/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/bar_categorical/plot_bar.py +25 -0
- figrecipe/_dev/demo_plotters/bar_categorical/plot_barh.py +25 -0
- figrecipe/_dev/demo_plotters/contour_surface/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/contour_surface/plot_contour.py +30 -0
- figrecipe/_dev/demo_plotters/contour_surface/plot_contourf.py +29 -0
- figrecipe/_dev/demo_plotters/contour_surface/plot_tricontour.py +28 -0
- figrecipe/_dev/demo_plotters/contour_surface/plot_tricontourf.py +28 -0
- figrecipe/_dev/demo_plotters/contour_surface/plot_tripcolor.py +29 -0
- figrecipe/_dev/demo_plotters/contour_surface/plot_triplot.py +25 -0
- figrecipe/_dev/demo_plotters/distribution/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/distribution/plot_boxplot.py +24 -0
- figrecipe/_dev/demo_plotters/distribution/plot_ecdf.py +24 -0
- figrecipe/_dev/demo_plotters/distribution/plot_hist.py +24 -0
- figrecipe/_dev/demo_plotters/distribution/plot_hist2d.py +25 -0
- figrecipe/_dev/demo_plotters/distribution/plot_violinplot.py +25 -0
- figrecipe/_dev/demo_plotters/image_matrix/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/image_matrix/plot_hexbin.py +25 -0
- figrecipe/_dev/demo_plotters/image_matrix/plot_imshow.py +23 -0
- figrecipe/_dev/demo_plotters/image_matrix/plot_matshow.py +23 -0
- figrecipe/_dev/demo_plotters/image_matrix/plot_pcolor.py +29 -0
- figrecipe/_dev/demo_plotters/image_matrix/plot_pcolormesh.py +29 -0
- figrecipe/_dev/demo_plotters/image_matrix/plot_spy.py +29 -0
- figrecipe/_dev/demo_plotters/line_curve/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_errorbar.py +28 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_fill.py +29 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_fill_between.py +30 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_fill_betweenx.py +28 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_plot.py +28 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_stackplot.py +29 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_stairs.py +27 -0
- figrecipe/_dev/demo_plotters/line_curve/plot_step.py +27 -0
- figrecipe/_dev/demo_plotters/scatter_points/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/scatter_points/plot_scatter.py +24 -0
- figrecipe/_dev/demo_plotters/special/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/special/plot_eventplot.py +25 -0
- figrecipe/_dev/demo_plotters/special/plot_loglog.py +27 -0
- figrecipe/_dev/demo_plotters/special/plot_pie.py +27 -0
- figrecipe/_dev/demo_plotters/special/plot_semilogx.py +27 -0
- figrecipe/_dev/demo_plotters/special/plot_semilogy.py +27 -0
- figrecipe/_dev/demo_plotters/special/plot_stem.py +27 -0
- figrecipe/_dev/demo_plotters/spectral_signal/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_acorr.py +24 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_angle_spectrum.py +28 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_cohere.py +29 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_csd.py +29 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_magnitude_spectrum.py +28 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_phase_spectrum.py +28 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_psd.py +29 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_specgram.py +30 -0
- figrecipe/_dev/demo_plotters/spectral_signal/plot_xcorr.py +25 -0
- figrecipe/_dev/demo_plotters/vector_flow/__init__.py +4 -0
- figrecipe/_dev/demo_plotters/vector_flow/plot_barbs.py +30 -0
- figrecipe/_dev/demo_plotters/vector_flow/plot_quiver.py +30 -0
- figrecipe/_dev/demo_plotters/vector_flow/plot_streamplot.py +30 -0
- figrecipe/_editor/__init__.py +278 -0
- figrecipe/_editor/_bbox/__init__.py +43 -0
- figrecipe/_editor/_bbox/_collections.py +177 -0
- figrecipe/_editor/_bbox/_elements.py +159 -0
- figrecipe/_editor/_bbox/_extract.py +256 -0
- figrecipe/_editor/_bbox/_extract_axes.py +370 -0
- figrecipe/_editor/_bbox/_extract_text.py +342 -0
- figrecipe/_editor/_bbox/_lines.py +173 -0
- figrecipe/_editor/_bbox/_transforms.py +146 -0
- figrecipe/_editor/_flask_app.py +258 -0
- figrecipe/_editor/_helpers.py +242 -0
- figrecipe/_editor/_hitmap/__init__.py +76 -0
- figrecipe/_editor/_hitmap/_artists/__init__.py +21 -0
- figrecipe/_editor/_hitmap/_artists/_collections.py +345 -0
- figrecipe/_editor/_hitmap/_artists/_images.py +68 -0
- figrecipe/_editor/_hitmap/_artists/_lines.py +107 -0
- figrecipe/_editor/_hitmap/_artists/_patches.py +163 -0
- figrecipe/_editor/_hitmap/_artists/_text.py +190 -0
- figrecipe/_editor/_hitmap/_colors.py +181 -0
- figrecipe/_editor/_hitmap/_detect.py +137 -0
- figrecipe/_editor/_hitmap/_restore.py +154 -0
- figrecipe/_editor/_hitmap_main.py +182 -0
- figrecipe/_editor/_overrides.py +318 -0
- figrecipe/_editor/_preferences.py +135 -0
- figrecipe/_editor/_render_overrides.py +480 -0
- figrecipe/_editor/_renderer.py +199 -0
- figrecipe/_editor/_routes_axis.py +453 -0
- figrecipe/_editor/_routes_core.py +284 -0
- figrecipe/_editor/_routes_element.py +317 -0
- figrecipe/_editor/_routes_style.py +223 -0
- figrecipe/_editor/_templates/__init__.py +152 -0
- figrecipe/_editor/_templates/_html.py +502 -0
- figrecipe/_editor/_templates/_scripts/__init__.py +120 -0
- figrecipe/_editor/_templates/_scripts/_api.py +228 -0
- figrecipe/_editor/_templates/_scripts/_colors.py +485 -0
- figrecipe/_editor/_templates/_scripts/_core.py +436 -0
- figrecipe/_editor/_templates/_scripts/_debug_snapshot.py +186 -0
- figrecipe/_editor/_templates/_scripts/_element_editor.py +310 -0
- figrecipe/_editor/_templates/_scripts/_files.py +195 -0
- figrecipe/_editor/_templates/_scripts/_hitmap.py +509 -0
- figrecipe/_editor/_templates/_scripts/_inspector.py +315 -0
- figrecipe/_editor/_templates/_scripts/_labels.py +464 -0
- figrecipe/_editor/_templates/_scripts/_legend_drag.py +265 -0
- figrecipe/_editor/_templates/_scripts/_modals.py +226 -0
- figrecipe/_editor/_templates/_scripts/_overlays.py +292 -0
- figrecipe/_editor/_templates/_scripts/_panel_drag.py +334 -0
- figrecipe/_editor/_templates/_scripts/_panel_position.py +279 -0
- figrecipe/_editor/_templates/_scripts/_selection.py +237 -0
- figrecipe/_editor/_templates/_scripts/_tabs.py +89 -0
- figrecipe/_editor/_templates/_scripts/_view_mode.py +107 -0
- figrecipe/_editor/_templates/_scripts/_zoom.py +179 -0
- figrecipe/_editor/_templates/_styles/__init__.py +69 -0
- figrecipe/_editor/_templates/_styles/_base.py +64 -0
- figrecipe/_editor/_templates/_styles/_buttons.py +206 -0
- figrecipe/_editor/_templates/_styles/_color_input.py +123 -0
- figrecipe/_editor/_templates/_styles/_controls.py +265 -0
- figrecipe/_editor/_templates/_styles/_dynamic_props.py +144 -0
- figrecipe/_editor/_templates/_styles/_forms.py +126 -0
- figrecipe/_editor/_templates/_styles/_hitmap.py +184 -0
- figrecipe/_editor/_templates/_styles/_inspector.py +90 -0
- figrecipe/_editor/_templates/_styles/_labels.py +118 -0
- figrecipe/_editor/_templates/_styles/_modals.py +98 -0
- figrecipe/_editor/_templates/_styles/_overlays.py +130 -0
- figrecipe/_editor/_templates/_styles/_preview.py +225 -0
- figrecipe/_editor/_templates/_styles/_selection.py +73 -0
- figrecipe/_params/_DECORATION_METHODS.py +33 -0
- figrecipe/_params/_PLOTTING_METHODS.py +58 -0
- figrecipe/_params/__init__.py +9 -0
- figrecipe/_recorder.py +92 -110
- figrecipe/_recorder_utils.py +124 -0
- figrecipe/_reproducer/__init__.py +18 -0
- figrecipe/_reproducer/_core.py +498 -0
- figrecipe/_reproducer/_custom_plots.py +279 -0
- figrecipe/_reproducer/_seaborn.py +100 -0
- figrecipe/_reproducer/_violin.py +186 -0
- figrecipe/_seaborn.py +14 -9
- figrecipe/_serializer.py +2 -2
- figrecipe/_signatures/README.md +68 -0
- figrecipe/_signatures/__init__.py +12 -2
- figrecipe/_signatures/_kwargs.py +273 -0
- figrecipe/_signatures/_loader.py +114 -57
- figrecipe/_signatures/_parsing.py +147 -0
- figrecipe/_utils/__init__.py +6 -4
- figrecipe/_utils/_crop.py +10 -4
- figrecipe/_utils/_image_diff.py +37 -33
- figrecipe/_utils/_numpy_io.py +0 -1
- figrecipe/_utils/_units.py +11 -3
- figrecipe/_validator.py +12 -3
- figrecipe/_wrappers/_axes.py +193 -170
- figrecipe/_wrappers/_axes_helpers.py +136 -0
- figrecipe/_wrappers/_axes_plots.py +418 -0
- figrecipe/_wrappers/_axes_seaborn.py +157 -0
- figrecipe/_wrappers/_figure.py +277 -18
- figrecipe/_wrappers/_panel_labels.py +127 -0
- figrecipe/_wrappers/_plot_helpers.py +143 -0
- figrecipe/_wrappers/_violin_helpers.py +180 -0
- figrecipe/plt.py +0 -1
- figrecipe/pyplot.py +2 -1
- figrecipe/styles/__init__.py +12 -11
- figrecipe/styles/_dotdict.py +72 -0
- figrecipe/styles/_finalize.py +134 -0
- figrecipe/styles/_fonts.py +77 -0
- figrecipe/styles/_kwargs_converter.py +178 -0
- figrecipe/styles/_plot_styles.py +209 -0
- figrecipe/styles/_style_applier.py +60 -202
- figrecipe/styles/_style_loader.py +73 -121
- figrecipe/styles/_themes.py +151 -0
- figrecipe/styles/presets/MATPLOTLIB.yaml +95 -0
- figrecipe/styles/presets/SCITEX.yaml +181 -0
- figrecipe-0.7.4.dist-info/METADATA +429 -0
- figrecipe-0.7.4.dist-info/RECORD +188 -0
- figrecipe/_reproducer.py +0 -358
- figrecipe-0.5.0.dist-info/METADATA +0 -336
- figrecipe-0.5.0.dist-info/RECORD +0 -26
- {figrecipe-0.5.0.dist-info → figrecipe-0.7.4.dist-info}/WHEEL +0 -0
- {figrecipe-0.5.0.dist-info → figrecipe-0.7.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""Theme color utilities for figrecipe styles."""
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Optional
|
|
6
|
+
|
|
7
|
+
from matplotlib.axes import Axes
|
|
8
|
+
|
|
9
|
+
# Default theme color palettes (Monaco/VS Code style for dark)
|
|
10
|
+
THEME_COLORS = {
|
|
11
|
+
"dark": {
|
|
12
|
+
"figure_bg": "#1e1e1e", # VS Code main background
|
|
13
|
+
"axes_bg": "#252526", # VS Code panel background
|
|
14
|
+
"legend_bg": "#252526", # Same as axes
|
|
15
|
+
"text": "#d4d4d4", # VS Code default text
|
|
16
|
+
"spine": "#3c3c3c", # Subtle border color
|
|
17
|
+
"tick": "#d4d4d4", # Match text
|
|
18
|
+
"grid": "#3a3a3a", # Subtle grid
|
|
19
|
+
},
|
|
20
|
+
"light": {
|
|
21
|
+
"figure_bg": "none", # Transparent
|
|
22
|
+
"axes_bg": "none", # Transparent
|
|
23
|
+
"legend_bg": "none", # Transparent
|
|
24
|
+
"text": "black",
|
|
25
|
+
"spine": "black",
|
|
26
|
+
"tick": "black",
|
|
27
|
+
"grid": "#cccccc",
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def apply_theme_colors(
|
|
33
|
+
ax: Axes,
|
|
34
|
+
theme: str = "light",
|
|
35
|
+
custom_colors: Optional[Dict[str, str]] = None,
|
|
36
|
+
) -> None:
|
|
37
|
+
"""Apply theme colors to axes for dark/light mode support.
|
|
38
|
+
|
|
39
|
+
Parameters
|
|
40
|
+
----------
|
|
41
|
+
ax : matplotlib.axes.Axes
|
|
42
|
+
Target axes to apply theme to
|
|
43
|
+
theme : str or dict
|
|
44
|
+
Color theme: "light" or "dark" (default: "light")
|
|
45
|
+
If dict, extracts 'mode' key (for YAML-style theme dicts)
|
|
46
|
+
custom_colors : dict, optional
|
|
47
|
+
Custom color overrides. Keys: figure_bg, axes_bg, legend_bg, text, spine, tick, grid
|
|
48
|
+
|
|
49
|
+
Examples
|
|
50
|
+
--------
|
|
51
|
+
>>> fig, ax = plt.subplots()
|
|
52
|
+
>>> apply_theme_colors(ax, theme="dark") # Eye-friendly dark mode
|
|
53
|
+
"""
|
|
54
|
+
# Handle dict-style theme (from YAML: {mode: "light", dark: {...}})
|
|
55
|
+
if isinstance(theme, dict):
|
|
56
|
+
theme = theme.get("mode", "light")
|
|
57
|
+
|
|
58
|
+
# Ensure theme is a string
|
|
59
|
+
if not isinstance(theme, str):
|
|
60
|
+
theme = "light"
|
|
61
|
+
|
|
62
|
+
# Get base theme colors
|
|
63
|
+
colors = THEME_COLORS.get(theme, THEME_COLORS["light"]).copy()
|
|
64
|
+
|
|
65
|
+
# Apply custom overrides
|
|
66
|
+
if custom_colors:
|
|
67
|
+
# Handle legacy key name (background -> figure_bg)
|
|
68
|
+
if "background" in custom_colors and "figure_bg" not in custom_colors:
|
|
69
|
+
custom_colors["figure_bg"] = custom_colors.pop("background")
|
|
70
|
+
colors.update(custom_colors)
|
|
71
|
+
|
|
72
|
+
# Helper to check for transparent/none
|
|
73
|
+
def is_transparent(color):
|
|
74
|
+
if color is None:
|
|
75
|
+
return False
|
|
76
|
+
return str(color).lower() in ("none", "transparent")
|
|
77
|
+
|
|
78
|
+
# Apply axes background (handle "none"/"transparent" for transparency)
|
|
79
|
+
axes_bg = colors.get("axes_bg", "none")
|
|
80
|
+
if is_transparent(axes_bg):
|
|
81
|
+
ax.set_facecolor("none")
|
|
82
|
+
ax.patch.set_alpha(0)
|
|
83
|
+
else:
|
|
84
|
+
ax.set_facecolor(axes_bg)
|
|
85
|
+
|
|
86
|
+
# Apply figure background if accessible
|
|
87
|
+
fig = ax.get_figure()
|
|
88
|
+
if fig is not None:
|
|
89
|
+
fig_bg = colors.get("figure_bg", "none")
|
|
90
|
+
if is_transparent(fig_bg):
|
|
91
|
+
fig.patch.set_facecolor("none")
|
|
92
|
+
fig.patch.set_alpha(0)
|
|
93
|
+
else:
|
|
94
|
+
fig.patch.set_facecolor(fig_bg)
|
|
95
|
+
|
|
96
|
+
# Apply text colors to figure-level text elements
|
|
97
|
+
if hasattr(fig, "_suptitle") and fig._suptitle is not None:
|
|
98
|
+
fig._suptitle.set_color(colors["text"])
|
|
99
|
+
if hasattr(fig, "_supxlabel") and fig._supxlabel is not None:
|
|
100
|
+
fig._supxlabel.set_color(colors["text"])
|
|
101
|
+
if hasattr(fig, "_supylabel") and fig._supylabel is not None:
|
|
102
|
+
fig._supylabel.set_color(colors["text"])
|
|
103
|
+
|
|
104
|
+
# Apply text colors (labels, titles)
|
|
105
|
+
ax.xaxis.label.set_color(colors["text"])
|
|
106
|
+
ax.yaxis.label.set_color(colors["text"])
|
|
107
|
+
ax.title.set_color(colors["text"])
|
|
108
|
+
|
|
109
|
+
# Update rcParams for dark mode support (pie charts, panel labels)
|
|
110
|
+
import matplotlib as mpl
|
|
111
|
+
|
|
112
|
+
mpl.rcParams["text.color"] = colors["text"]
|
|
113
|
+
mpl.rcParams["axes.labelcolor"] = colors["text"]
|
|
114
|
+
mpl.rcParams["xtick.color"] = colors["tick"]
|
|
115
|
+
mpl.rcParams["ytick.color"] = colors["tick"]
|
|
116
|
+
|
|
117
|
+
# Apply spine colors
|
|
118
|
+
for spine in ax.spines.values():
|
|
119
|
+
spine.set_color(colors["spine"])
|
|
120
|
+
|
|
121
|
+
# Apply tick colors (both marks and labels)
|
|
122
|
+
ax.tick_params(colors=colors["tick"], which="both")
|
|
123
|
+
for label in ax.get_xticklabels() + ax.get_yticklabels():
|
|
124
|
+
label.set_color(colors["tick"])
|
|
125
|
+
|
|
126
|
+
# Apply text colors to all text objects (panel labels, pie labels, annotations)
|
|
127
|
+
for text in ax.texts:
|
|
128
|
+
text.set_color(colors["text"])
|
|
129
|
+
|
|
130
|
+
# Apply legend colors if legend exists
|
|
131
|
+
legend = ax.get_legend()
|
|
132
|
+
if legend is not None:
|
|
133
|
+
for text in legend.get_texts():
|
|
134
|
+
text.set_color(colors["text"])
|
|
135
|
+
title = legend.get_title()
|
|
136
|
+
if title:
|
|
137
|
+
title.set_color(colors["text"])
|
|
138
|
+
frame = legend.get_frame()
|
|
139
|
+
if frame:
|
|
140
|
+
legend_bg = colors.get("legend_bg", colors.get("axes_bg", "none"))
|
|
141
|
+
if is_transparent(legend_bg):
|
|
142
|
+
frame.set_facecolor("none")
|
|
143
|
+
frame.set_alpha(0)
|
|
144
|
+
else:
|
|
145
|
+
frame.set_facecolor(legend_bg)
|
|
146
|
+
frame.set_edgecolor(colors["spine"])
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
__all__ = ["THEME_COLORS", "apply_theme_colors"]
|
|
150
|
+
|
|
151
|
+
# EOF
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Timestamp: "2025-12-22 13:49:42 (ywatanabe)"
|
|
2
|
+
# File: ./src/figrecipe/styles/presets/MATPLOTLIB.yaml
|
|
3
|
+
# MATPLOTLIB Style Preset
|
|
4
|
+
# =======================
|
|
5
|
+
# Vanilla matplotlib defaults - minimal customization.
|
|
6
|
+
# Use this to reset to standard matplotlib behavior.
|
|
7
|
+
|
|
8
|
+
axes:
|
|
9
|
+
width_mm: null # Use matplotlib default (auto)
|
|
10
|
+
height_mm: null # Use matplotlib default (auto)
|
|
11
|
+
thickness_mm: null # Use matplotlib default
|
|
12
|
+
|
|
13
|
+
margins:
|
|
14
|
+
left_mm: null
|
|
15
|
+
right_mm: null
|
|
16
|
+
bottom_mm: null
|
|
17
|
+
top_mm: null
|
|
18
|
+
|
|
19
|
+
spacing:
|
|
20
|
+
horizontal_mm: null
|
|
21
|
+
vertical_mm: null
|
|
22
|
+
|
|
23
|
+
fonts:
|
|
24
|
+
family: null # matplotlib default (DejaVu Sans)
|
|
25
|
+
axis_label_pt: null
|
|
26
|
+
tick_label_pt: null
|
|
27
|
+
title_pt: null
|
|
28
|
+
suptitle_pt: null
|
|
29
|
+
legend_pt: null
|
|
30
|
+
annotation_pt: null
|
|
31
|
+
|
|
32
|
+
padding:
|
|
33
|
+
label_pt: null
|
|
34
|
+
tick_pt: null
|
|
35
|
+
title_pt: null
|
|
36
|
+
|
|
37
|
+
lines:
|
|
38
|
+
trace_mm: null
|
|
39
|
+
errorbar_mm: null
|
|
40
|
+
errorbar_cap_mm: null
|
|
41
|
+
|
|
42
|
+
ticks:
|
|
43
|
+
length_mm: null
|
|
44
|
+
thickness_mm: null
|
|
45
|
+
direction: null
|
|
46
|
+
n_ticks_min: null
|
|
47
|
+
n_ticks_max: null
|
|
48
|
+
|
|
49
|
+
markers:
|
|
50
|
+
size_mm: null
|
|
51
|
+
scatter_mm: null
|
|
52
|
+
edge_width_mm: null
|
|
53
|
+
|
|
54
|
+
legend:
|
|
55
|
+
frameon: null # matplotlib default (True)
|
|
56
|
+
bg: null # matplotlib default
|
|
57
|
+
edgecolor: null # matplotlib default
|
|
58
|
+
alpha: null # matplotlib default
|
|
59
|
+
loc: null # matplotlib default
|
|
60
|
+
|
|
61
|
+
output:
|
|
62
|
+
dpi: 300
|
|
63
|
+
transparent: false
|
|
64
|
+
format: "png"
|
|
65
|
+
|
|
66
|
+
behavior:
|
|
67
|
+
auto_scale_axes: false
|
|
68
|
+
hide_top_spine: false
|
|
69
|
+
hide_right_spine: false
|
|
70
|
+
grid: false
|
|
71
|
+
|
|
72
|
+
theme:
|
|
73
|
+
mode: "light"
|
|
74
|
+
dark:
|
|
75
|
+
figure_bg: "#1e1e1e"
|
|
76
|
+
axes_bg: "#1e1e1e"
|
|
77
|
+
legend_bg: "#1e1e1e"
|
|
78
|
+
text: "#d4d4d4"
|
|
79
|
+
spine: "#d4d4d4"
|
|
80
|
+
tick: "#d4d4d4"
|
|
81
|
+
grid: "#3a3a3a"
|
|
82
|
+
light:
|
|
83
|
+
figure_bg: "white"
|
|
84
|
+
axes_bg: "white"
|
|
85
|
+
legend_bg: "white"
|
|
86
|
+
text: "black"
|
|
87
|
+
spine: "black"
|
|
88
|
+
tick: "black"
|
|
89
|
+
grid: "#cccccc"
|
|
90
|
+
|
|
91
|
+
# Colors: Use matplotlib default (tab10)
|
|
92
|
+
colors:
|
|
93
|
+
palette: null
|
|
94
|
+
|
|
95
|
+
# EOF
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Timestamp: "2025-12-24 14:11:46 (ywatanabe)"
|
|
2
|
+
# File: ./src/figrecipe/styles/presets/SCITEX.yaml
|
|
3
|
+
# FIGRECIPE Style Preset
|
|
4
|
+
# ======================
|
|
5
|
+
# Publication-quality settings for scientific figures.
|
|
6
|
+
# Optimized for scientific journals with Arial font.
|
|
7
|
+
|
|
8
|
+
axes:
|
|
9
|
+
width_mm: 40
|
|
10
|
+
height_mm: 28
|
|
11
|
+
thickness_mm: 0.2
|
|
12
|
+
|
|
13
|
+
margins:
|
|
14
|
+
left_mm: 6 # Room for supylabel
|
|
15
|
+
right_mm: 1
|
|
16
|
+
bottom_mm: 5 # Room for supxlabel
|
|
17
|
+
top_mm: 5 # Room for suptitle
|
|
18
|
+
|
|
19
|
+
spacing:
|
|
20
|
+
horizontal_mm: 10 # Between columns
|
|
21
|
+
vertical_mm: 15 # Between rows (includes title + xlabel space)
|
|
22
|
+
suptitle_mm: 5 # Space reserved for figure suptitle
|
|
23
|
+
supxlabel_mm: 3 # Space reserved for figure super x-label
|
|
24
|
+
supylabel_mm: 3 # Space reserved for figure super y-label
|
|
25
|
+
|
|
26
|
+
fonts:
|
|
27
|
+
family: "Arial"
|
|
28
|
+
axis_label_pt: 7
|
|
29
|
+
tick_label_pt: 7
|
|
30
|
+
title_pt: 8
|
|
31
|
+
suptitle_pt: 9 # Figure suptitle (slightly larger than subplot titles)
|
|
32
|
+
supxlabel_pt: 7 # Figure-level x-label (same as axis labels)
|
|
33
|
+
supylabel_pt: 7 # Figure-level y-label (same as axis labels)
|
|
34
|
+
panel_label_pt: 10 # Panel labels (A, B, C, ...) - bold, prominent
|
|
35
|
+
legend_pt: 6
|
|
36
|
+
annotation_pt: 6
|
|
37
|
+
|
|
38
|
+
padding:
|
|
39
|
+
label_pt: 2.0
|
|
40
|
+
tick_pt: 2.0
|
|
41
|
+
title_pt: 4.0
|
|
42
|
+
|
|
43
|
+
lines:
|
|
44
|
+
trace_mm: 0.2
|
|
45
|
+
errorbar_mm: 0.2
|
|
46
|
+
errorbar_cap_mm: 0.8
|
|
47
|
+
|
|
48
|
+
ticks:
|
|
49
|
+
length_mm: 0.8
|
|
50
|
+
thickness_mm: 0.2
|
|
51
|
+
direction: "out"
|
|
52
|
+
n_ticks_min: 3
|
|
53
|
+
n_ticks_max: 4
|
|
54
|
+
|
|
55
|
+
markers:
|
|
56
|
+
size_mm: 0.8
|
|
57
|
+
scatter_mm: 0.8
|
|
58
|
+
flier_mm: 0.8 # Boxplot outlier marker size
|
|
59
|
+
edge_width_mm: null # None = no border (cleaner than 0)
|
|
60
|
+
|
|
61
|
+
boxplot:
|
|
62
|
+
line_mm: 0.2 # Box outline thickness
|
|
63
|
+
whisker_mm: 0.2 # Whisker line thickness
|
|
64
|
+
cap_mm: 0.2 # Cap line thickness
|
|
65
|
+
median_mm: 0.2 # Median line thickness
|
|
66
|
+
median_color: "black" # Median line color
|
|
67
|
+
flier_edge_mm: 0.2 # Outlier marker edge thickness
|
|
68
|
+
|
|
69
|
+
violinplot:
|
|
70
|
+
line_mm: 0.2 # Violin outline thickness
|
|
71
|
+
inner: "box" # Inner display: "box", "quartile", "point", "stick", or "swarm"
|
|
72
|
+
box_width_mm: 1.5 # Inner box width
|
|
73
|
+
whisker_mm: 0.2 # Whisker line thickness
|
|
74
|
+
median_mm: 0.8 # Median marker size
|
|
75
|
+
alpha: 0.7 # Violin fill transparency (modern: semi-transparent)
|
|
76
|
+
showmeans: false # Show mean line
|
|
77
|
+
showmedians: true # Show median line
|
|
78
|
+
showextrema: false # Hide min/max lines for cleaner look
|
|
79
|
+
|
|
80
|
+
barplot:
|
|
81
|
+
edge_mm: 0.2 # Bar edge/border thickness
|
|
82
|
+
|
|
83
|
+
histogram:
|
|
84
|
+
edge_mm: 0.2 # Histogram bar edge thickness
|
|
85
|
+
|
|
86
|
+
pie:
|
|
87
|
+
text_pt: 6 # Pie chart text size (labels, autopct)
|
|
88
|
+
show_axes: false # Hide axes for pie charts
|
|
89
|
+
edge_color: "black" # Wedge edge color (black for contrast)
|
|
90
|
+
edge_mm: 0.2 # Wedge edge thickness
|
|
91
|
+
|
|
92
|
+
imshow:
|
|
93
|
+
show_axes: false # Hide ticks, ticklabels, spines for imshow
|
|
94
|
+
show_labels: false # Hide x/y labels for imshow
|
|
95
|
+
|
|
96
|
+
eventplot:
|
|
97
|
+
linewidth_mm: 0.2 # Event line thickness
|
|
98
|
+
linelength: 0.8 # Event line length (fraction of spacing)
|
|
99
|
+
|
|
100
|
+
matshow:
|
|
101
|
+
show_axes: false # Hide axes for matrix display
|
|
102
|
+
xticklabel_position: "bottom" # Put xlabels at bottom (not top)
|
|
103
|
+
|
|
104
|
+
spy:
|
|
105
|
+
show_axes: false # Hide axes for spy plots
|
|
106
|
+
xticklabel_position: "bottom" # Put xlabels at bottom
|
|
107
|
+
|
|
108
|
+
legend:
|
|
109
|
+
frameon: false # No frame for clean look
|
|
110
|
+
bg: null # Background (null = use theme.legend_bg)
|
|
111
|
+
edgecolor: null # Frame edge color
|
|
112
|
+
alpha: 1.0 # Transparency
|
|
113
|
+
loc: "best"
|
|
114
|
+
|
|
115
|
+
output:
|
|
116
|
+
dpi: 300
|
|
117
|
+
transparent: true
|
|
118
|
+
format: "pdf"
|
|
119
|
+
|
|
120
|
+
behavior:
|
|
121
|
+
auto_scale_axes: true
|
|
122
|
+
hide_top_spine: true
|
|
123
|
+
hide_right_spine: true
|
|
124
|
+
grid: false
|
|
125
|
+
constrained_layout: true # Auto-spacing for suptitle/supxlabel/supylabel
|
|
126
|
+
panel_labels: true # Auto-add A, B, C labels to multi-panel figures
|
|
127
|
+
|
|
128
|
+
theme:
|
|
129
|
+
mode: "light"
|
|
130
|
+
dark:
|
|
131
|
+
figure_bg: "transparent"
|
|
132
|
+
axes_bg: "transparent"
|
|
133
|
+
legend_bg: "transparent"
|
|
134
|
+
text: "#d4d4d4"
|
|
135
|
+
spine: "#d4d4d4"
|
|
136
|
+
tick: "#d4d4d4"
|
|
137
|
+
grid: "#3a3a3a"
|
|
138
|
+
light:
|
|
139
|
+
figure_bg: "transparent"
|
|
140
|
+
axes_bg: "transparent"
|
|
141
|
+
legend_bg: "transparent"
|
|
142
|
+
text: "black"
|
|
143
|
+
spine: "black"
|
|
144
|
+
tick: "black"
|
|
145
|
+
grid: "#cccccc"
|
|
146
|
+
|
|
147
|
+
# SciTeX Color Palette (RGB format)
|
|
148
|
+
colors:
|
|
149
|
+
palette:
|
|
150
|
+
- [0, 128, 192] # blue
|
|
151
|
+
- [255, 70, 50] # red
|
|
152
|
+
- [20, 180, 20] # green
|
|
153
|
+
- [230, 160, 20] # yellow
|
|
154
|
+
- [200, 50, 255] # purple
|
|
155
|
+
- [20, 200, 200] # lightblue
|
|
156
|
+
- [228, 94, 50] # orange
|
|
157
|
+
- [255, 150, 200] # pink
|
|
158
|
+
|
|
159
|
+
rgb:
|
|
160
|
+
# Named colors
|
|
161
|
+
- white: [255, 255, 255]
|
|
162
|
+
- black: [0, 0, 0]
|
|
163
|
+
- blue: [0, 128, 192]
|
|
164
|
+
- red: [255, 70, 50]
|
|
165
|
+
- pink: [255, 150, 200]
|
|
166
|
+
- green: [20, 180, 20]
|
|
167
|
+
- yellow: [230, 160, 20]
|
|
168
|
+
- gray: [128, 128, 128]
|
|
169
|
+
- grey: [128, 128, 128]
|
|
170
|
+
- purple: [200, 50, 255]
|
|
171
|
+
- lightblue: [20, 200, 200]
|
|
172
|
+
- brown: [128, 0, 0]
|
|
173
|
+
- navy: [0, 0, 100]
|
|
174
|
+
- orange: [228, 94, 50]
|
|
175
|
+
|
|
176
|
+
# Semantic
|
|
177
|
+
- primary: [0, 128, 192]
|
|
178
|
+
- secondary: [255, 70, 50]
|
|
179
|
+
- accent: [20, 180, 20]
|
|
180
|
+
|
|
181
|
+
# EOF
|