-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstyle-variants.yaml
More file actions
278 lines (268 loc) · 14.4 KB
/
style-variants.yaml
File metadata and controls
278 lines (268 loc) · 14.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# Style variants for scripts/style-experiment.py
#
# Each variant is a named bundle of text patches applied to the plot
# implementation source file before rendering. Two kinds of patches:
# - {find: STR, replace: STR} - literal substring (all occurrences)
# - {regex: PATTERN, replace: R} - Python regex
#
# Patches are keyed by library name. "*" applies to all libraries.
# Non-matching patches are silently skipped, so a single variant can target
# whatever libraries actually contain the pattern.
#
# Library names match the implementation file names:
# matplotlib seaborn plotnine plotly bokeh altair pygal highcharts letsplot
variants:
baseline:
description: "Current production style (no changes)"
patches: {}
smaller_canvas:
description: "Halved canvas (~2400x1350). Fonts unchanged - effective text doubles on thumbnails."
patches:
matplotlib:
- {find: "figsize=(16, 9)", replace: "figsize=(8, 4.5)"}
seaborn:
- {find: "figsize=(16, 9)", replace: "figsize=(8, 4.5)"}
plotnine:
- {find: "figure_size=(16, 9)", replace: "figure_size=(8, 4.5)"}
plotly:
- {find: "width=1600", replace: "width=800"}
- {find: "height=900", replace: "height=450"}
altair:
- {find: "width=1600", replace: "width=800"}
- {find: "height=900", replace: "height=450"}
bokeh:
- {find: "width=4800", replace: "width=2400"}
- {find: "height=2700", replace: "height=1350"}
bigger_fonts:
description: "Title 24->40pt, axis 20->32pt, tick 16->26pt, line 3->5. Canvas unchanged."
patches:
"*":
- {regex: 'fontsize=24\b', replace: "fontsize=40"}
- {regex: 'fontsize=20\b', replace: "fontsize=32"}
- {regex: 'fontsize=16\b', replace: "fontsize=26"}
- {regex: 'linewidth=3\b', replace: "linewidth=5"}
- {regex: '"size":\s*28\b', replace: '"size": 44'}
- {regex: '"size":\s*22\b', replace: '"size": 34'}
- {regex: '"size":\s*18\b', replace: '"size": 28'}
combo_smaller_canvas_modest_fonts:
description: "Halved canvas + modestly larger fonts (title 28, axis 22, tick 18). Recommended starting point."
patches:
"*":
- {regex: 'figsize=\(16, 9\)', replace: "figsize=(8, 4.5)"}
- {regex: 'figure_size=\(16, 9\)', replace: "figure_size=(8, 4.5)"}
- {regex: 'fontsize=24\b', replace: "fontsize=28"}
- {regex: 'fontsize=20\b', replace: "fontsize=22"}
- {regex: 'fontsize=16\b', replace: "fontsize=18"}
plotly:
- {find: "width=1600", replace: "width=800"}
- {find: "height=900", replace: "height=450"}
altair:
- {find: "width=1600", replace: "width=800"}
- {find: "height=900", replace: "height=450"}
bokeh:
- {find: "width=4800", replace: "width=2400"}
- {find: "height=2700", replace: "height=1350"}
A_canvas_half_dpi_double:
description: "Canvas figsize/width halved, DPI/scale doubled. Output stays 4800x2700 px. For DPI/scale libs, fonts/lines/markers (all in pt) auto-double via DPI. For native-px libs (bokeh/highcharts/pygal): explicit ~2x on font/line/marker."
patches:
matplotlib:
- {find: "figsize=(16, 9)", replace: "figsize=(8, 4.5)"}
- {find: "dpi=300", replace: "dpi=600"}
seaborn:
- {find: "figsize=(16, 9)", replace: "figsize=(8, 4.5)"}
- {find: "dpi=300", replace: "dpi=600"}
plotnine:
- {find: "figure_size=(16, 9)", replace: "figure_size=(8, 4.5)"}
- {find: "dpi=300", replace: "dpi=600"}
plotly:
- {find: "width=1600", replace: "width=800"}
- {find: "height=900", replace: "height=450"}
- {regex: 'scale=3\b', replace: "scale=6"}
altair:
- {find: "width=1600", replace: "width=800"}
- {find: "height=900", replace: "height=450"}
- {find: "scale_factor=3.0", replace: "scale_factor=6.0"}
letsplot:
- {find: "ggsize(1600, 900)", replace: "ggsize(800, 450)"}
- {regex: 'scale=3\b', replace: "scale=6"}
bokeh:
- {find: "width=4800", replace: "width=2400"}
- {find: "height=2700", replace: "height=1350"}
- {find: "width=3600", replace: "width=1800"}
- {find: "height=3600", replace: "height=1800"}
- {find: "W, H = 4800, 2700", replace: "W, H = 2400, 1350"}
- {find: "W, H = 3600, 3600", replace: "W, H = 1800, 1800"}
- {find: '"28pt"', replace: '"56pt"'}
- {find: '"22pt"', replace: '"44pt"'}
- {find: '"18pt"', replace: '"36pt"'}
- {find: '"16pt"', replace: '"32pt"'}
- {regex: 'line_width\s*=\s*4\b', replace: "line_width=8"}
- {regex: 'line_width\s*=\s*3\b', replace: "line_width=6"}
- {regex: 'line_width\s*=\s*2\b', replace: "line_width=4"}
highcharts:
- {find: "--window-size=4800,2700", replace: "--window-size=2400,1350"}
- {find: "--window-size=3600,3600", replace: "--window-size=1800,1800"}
- {find: '"width": 4800,', replace: '"width": 2400,'}
- {find: '"height": 2700,', replace: '"height": 1350,'}
- {find: '"width": 3600,', replace: '"width": 1800,'}
- {find: '"height": 3600,', replace: '"height": 1800,'}
- {find: 'style="width: 4800px; height: 2700px;"', replace: 'style="width: 2400px; height: 1350px;"'}
- {find: 'style="width: 3600px; height: 3600px;"', replace: 'style="width: 1800px; height: 1800px;"'}
- {find: '"fontSize": "28px"', replace: '"fontSize": "56px"'}
- {find: '"fontSize": "22px"', replace: '"fontSize": "44px"'}
- {find: '"fontSize": "18px"', replace: '"fontSize": "36px"'}
- {find: '"fontSize": "16px"', replace: '"fontSize": "32px"'}
- {regex: '"lineWidth":\s*4\b', replace: '"lineWidth": 8'}
- {regex: '"radius":\s*6\b', replace: '"radius": 12'}
- {regex: '"radius":\s*5\b', replace: '"radius": 10'}
pygal:
- {find: "width=4800", replace: "width=2400"}
- {find: "height=2700", replace: "height=1350"}
- {find: "width=3600", replace: "width=1800"}
- {find: "height=3600", replace: "height=1800"}
- {regex: 'title_font_size\s*=\s*28\b', replace: "title_font_size=56"}
- {regex: 'label_font_size\s*=\s*22\b', replace: "label_font_size=44"}
- {regex: 'major_label_font_size\s*=\s*18\b', replace: "major_label_font_size=36"}
- {regex: 'legend_font_size\s*=\s*16\b', replace: "legend_font_size=32"}
- {regex: 'value_font_size\s*=\s*14\b', replace: "value_font_size=28"}
- {regex: 'stroke_width\s*=\s*3\b', replace: "stroke_width=6"}
B_canvas_2400_keep_dpi:
description: "Source PNG shrinks to 2400x1350 (no DPI compensation). Fonts/lines/markers unchanged in pt/px - become relatively 2x larger. Trade-off: less 4K-detail, smaller bytes."
patches:
matplotlib:
- {find: "dpi=300", replace: "dpi=150"}
seaborn:
- {find: "dpi=300", replace: "dpi=150"}
plotnine:
- {find: "dpi=300", replace: "dpi=150"}
plotly:
- {find: "width=1600", replace: "width=800"}
- {find: "height=900", replace: "height=450"}
altair:
- {find: "width=1600", replace: "width=800"}
- {find: "height=900", replace: "height=450"}
letsplot:
- {find: "ggsize(1600, 900)", replace: "ggsize(800, 450)"}
bokeh:
- {find: "width=4800", replace: "width=2400"}
- {find: "height=2700", replace: "height=1350"}
- {find: "width=3600", replace: "width=1800"}
- {find: "height=3600", replace: "height=1800"}
- {find: "W, H = 4800, 2700", replace: "W, H = 2400, 1350"}
- {find: "W, H = 3600, 3600", replace: "W, H = 1800, 1800"}
highcharts:
- {find: "--window-size=4800,2700", replace: "--window-size=2400,1350"}
- {find: "--window-size=3600,3600", replace: "--window-size=1800,1800"}
- {find: '"width": 4800,', replace: '"width": 2400,'}
- {find: '"height": 2700,', replace: '"height": 1350,'}
- {find: '"width": 3600,', replace: '"width": 1800,'}
- {find: '"height": 3600,', replace: '"height": 1800,'}
- {find: 'style="width: 4800px; height: 2700px;"', replace: 'style="width: 2400px; height: 1350px;"'}
- {find: 'style="width: 3600px; height: 3600px;"', replace: 'style="width: 1800px; height: 1800px;"'}
pygal:
- {find: "width=4800", replace: "width=2400"}
- {find: "height=2700", replace: "height=1350"}
- {find: "width=3600", replace: "width=1800"}
- {find: "height=3600", replace: "height=1800"}
C_outliers_only:
description: "Only patch bokeh/highcharts/pygal (the 3 native-px outliers). Font x ~2.5, line x ~2.5, marker x ~2.5. Other 6 libraries unchanged."
patches:
bokeh:
- {find: '"28pt"', replace: '"70pt"'}
- {find: '"22pt"', replace: '"55pt"'}
- {find: '"18pt"', replace: '"45pt"'}
- {find: '"16pt"', replace: '"40pt"'}
- {regex: 'line_width\s*=\s*4\b', replace: "line_width=10"}
- {regex: 'line_width\s*=\s*3\b', replace: "line_width=8"}
- {regex: 'line_width\s*=\s*2\b', replace: "line_width=5"}
highcharts:
- {find: '"fontSize": "28px"', replace: '"fontSize": "70px"'}
- {find: '"fontSize": "22px"', replace: '"fontSize": "55px"'}
- {find: '"fontSize": "18px"', replace: '"fontSize": "45px"'}
- {find: '"fontSize": "16px"', replace: '"fontSize": "40px"'}
- {regex: '"lineWidth":\s*4\b', replace: '"lineWidth": 10'}
- {regex: '"radius":\s*6\b', replace: '"radius": 15'}
- {regex: '"radius":\s*5\b', replace: '"radius": 12'}
pygal:
- {regex: 'title_font_size\s*=\s*28\b', replace: "title_font_size=70"}
- {regex: 'label_font_size\s*=\s*22\b', replace: "label_font_size=55"}
- {regex: 'major_label_font_size\s*=\s*18\b', replace: "major_label_font_size=45"}
- {regex: 'legend_font_size\s*=\s*16\b', replace: "legend_font_size=40"}
- {regex: 'value_font_size\s*=\s*14\b', replace: "value_font_size=35"}
- {regex: 'stroke_width\s*=\s*3\b', replace: "stroke_width=8"}
D_canvas_half_dpi_double_plus_aggressive_outliers:
description: "A + C combined with aggressive (~3x) outlier boost. Upper-bound sanity check - tests if A's gain plus extra outlier-headroom over-saturates."
patches:
matplotlib:
- {find: "figsize=(16, 9)", replace: "figsize=(8, 4.5)"}
- {find: "dpi=300", replace: "dpi=600"}
seaborn:
- {find: "figsize=(16, 9)", replace: "figsize=(8, 4.5)"}
- {find: "dpi=300", replace: "dpi=600"}
plotnine:
- {find: "figure_size=(16, 9)", replace: "figure_size=(8, 4.5)"}
- {find: "dpi=300", replace: "dpi=600"}
plotly:
- {find: "width=1600", replace: "width=800"}
- {find: "height=900", replace: "height=450"}
- {regex: 'scale=3\b', replace: "scale=6"}
altair:
- {find: "width=1600", replace: "width=800"}
- {find: "height=900", replace: "height=450"}
- {find: "scale_factor=3.0", replace: "scale_factor=6.0"}
letsplot:
- {find: "ggsize(1600, 900)", replace: "ggsize(800, 450)"}
- {regex: 'scale=3\b', replace: "scale=6"}
bokeh:
- {find: "width=4800", replace: "width=2400"}
- {find: "height=2700", replace: "height=1350"}
- {find: "width=3600", replace: "width=1800"}
- {find: "height=3600", replace: "height=1800"}
- {find: "W, H = 4800, 2700", replace: "W, H = 2400, 1350"}
- {find: "W, H = 3600, 3600", replace: "W, H = 1800, 1800"}
- {find: '"28pt"', replace: '"84pt"'}
- {find: '"22pt"', replace: '"66pt"'}
- {find: '"18pt"', replace: '"54pt"'}
- {find: '"16pt"', replace: '"48pt"'}
- {regex: 'line_width\s*=\s*4\b', replace: "line_width=12"}
- {regex: 'line_width\s*=\s*3\b', replace: "line_width=9"}
- {regex: 'line_width\s*=\s*2\b', replace: "line_width=6"}
highcharts:
- {find: "--window-size=4800,2700", replace: "--window-size=2400,1350"}
- {find: "--window-size=3600,3600", replace: "--window-size=1800,1800"}
- {find: '"width": 4800,', replace: '"width": 2400,'}
- {find: '"height": 2700,', replace: '"height": 1350,'}
- {find: '"width": 3600,', replace: '"width": 1800,'}
- {find: '"height": 3600,', replace: '"height": 1800,'}
- {find: 'style="width: 4800px; height: 2700px;"', replace: 'style="width: 2400px; height: 1350px;"'}
- {find: 'style="width: 3600px; height: 3600px;"', replace: 'style="width: 1800px; height: 1800px;"'}
- {find: '"fontSize": "28px"', replace: '"fontSize": "84px"'}
- {find: '"fontSize": "22px"', replace: '"fontSize": "66px"'}
- {find: '"fontSize": "18px"', replace: '"fontSize": "54px"'}
- {find: '"fontSize": "16px"', replace: '"fontSize": "48px"'}
- {regex: '"lineWidth":\s*4\b', replace: '"lineWidth": 12'}
- {regex: '"radius":\s*6\b', replace: '"radius": 18'}
- {regex: '"radius":\s*5\b', replace: '"radius": 15'}
pygal:
- {find: "width=4800", replace: "width=2400"}
- {find: "height=2700", replace: "height=1350"}
- {find: "width=3600", replace: "width=1800"}
- {find: "height=3600", replace: "height=1800"}
- {regex: 'title_font_size\s*=\s*28\b', replace: "title_font_size=84"}
- {regex: 'label_font_size\s*=\s*22\b', replace: "label_font_size=66"}
- {regex: 'major_label_font_size\s*=\s*18\b', replace: "major_label_font_size=54"}
- {regex: 'legend_font_size\s*=\s*16\b', replace: "legend_font_size=48"}
- {regex: 'value_font_size\s*=\s*14\b', replace: "value_font_size=42"}
- {regex: 'stroke_width\s*=\s*3\b', replace: "stroke_width=9"}
palette_tableau:
description: "Tableau-10 categorical palette in place of the anyplot imprint palette (visual sanity check, not a real proposal)."
patches:
"*":
- {find: "#009E73", replace: "#4E79A7"}
- {find: "#C475FD", replace: "#F28E2B"}
- {find: "#4467A3", replace: "#59A14F"}
- {find: "#BD8233", replace: "#E15759"}
- {find: "#AE3030", replace: "#B07AA1"}
- {find: "#2ABCCD", replace: "#76B7B2"}
- {find: "#954477", replace: "#EDC948"}
- {find: "#99B314", replace: "#FF9DA7"}