terraproof 0.0.0-stage → 0.4.0
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.
- package/LICENSE +21 -0
- package/README.md +356 -2
- package/bin/terraproof.js +4 -0
- package/dist/router/apply.js +147 -0
- package/dist/router/classify.js +111 -0
- package/dist/router/explain.js +9 -0
- package/dist/router/index.js +272 -0
- package/dist/router/resolve.js +239 -0
- package/dist/router/score.js +60 -0
- package/dist/router/types.js +1 -0
- package/dist/router/validate.js +81 -0
- package/instructions/engineering.md +14 -0
- package/instructions/security.md +14 -0
- package/instructions/simplicity.md +13 -0
- package/package.json +65 -4
- package/routing/DOMAIN_ROUTING.md +161 -0
- package/routing/ROUTER_DESIGN.md +173 -0
- package/routing/SKILL_MANIFEST.md +86 -0
- package/routing/checks.json +121 -0
- package/routing/collections.json +47 -0
- package/routing/registry.json +2211 -0
- package/routing/rules.json +64 -0
- package/skills/accuracy-assessment/SKILL.md +213 -0
- package/skills/accuracy-assessment/UPSTREAM.md +7 -0
- package/skills/accuracy-assessment/references/stratified-estimator.md +127 -0
- package/skills/accuracy-assessment/skill.json +103 -0
- package/skills/brainstorming/SKILL.md +250 -0
- package/skills/brainstorming/UPSTREAM.md +29 -0
- package/skills/brainstorming/scripts/frame-template.html +213 -0
- package/skills/brainstorming/scripts/helper.js +167 -0
- package/skills/brainstorming/scripts/server.cjs +723 -0
- package/skills/brainstorming/scripts/start-server.sh +209 -0
- package/skills/brainstorming/scripts/stop-server.sh +120 -0
- package/skills/brainstorming/skill.json +73 -0
- package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/skills/brainstorming/visual-companion.md +299 -0
- package/skills/crs-and-units/SKILL.md +200 -0
- package/skills/crs-and-units/UPSTREAM.md +7 -0
- package/skills/crs-and-units/skill.json +74 -0
- package/skills/design-postgis-tables/SKILL.md +494 -0
- package/skills/design-postgis-tables/UPSTREAM.md +21 -0
- package/skills/design-postgis-tables/skill.json +90 -0
- package/skills/gdal/SKILL.md +125 -0
- package/skills/gdal/UPSTREAM.md +22 -0
- package/skills/gdal/references/gdal-recipes.md +103 -0
- package/skills/gdal/skill.json +66 -0
- package/skills/geomaster/README.md +105 -0
- package/skills/geomaster/SKILL.md +366 -0
- package/skills/geomaster/UPSTREAM.md +21 -0
- package/skills/geomaster/references/advanced-gis.md +376 -0
- package/skills/geomaster/references/big-data.md +363 -0
- package/skills/geomaster/references/code-examples.md +531 -0
- package/skills/geomaster/references/coordinate-systems.md +364 -0
- package/skills/geomaster/references/core-libraries.md +273 -0
- package/skills/geomaster/references/data-sources.md +330 -0
- package/skills/geomaster/references/gis-software.md +369 -0
- package/skills/geomaster/references/industry-applications.md +420 -0
- package/skills/geomaster/references/machine-learning.md +462 -0
- package/skills/geomaster/references/programming-languages.md +456 -0
- package/skills/geomaster/references/remote-sensing.md +370 -0
- package/skills/geomaster/references/scientific-domains.md +416 -0
- package/skills/geomaster/references/specialized-topics.md +428 -0
- package/skills/geomaster/references/troubleshooting.md +439 -0
- package/skills/geomaster/skill.json +157 -0
- package/skills/geopandas/SKILL.md +250 -0
- package/skills/geopandas/UPSTREAM.md +22 -0
- package/skills/geopandas/references/crs-management.md +231 -0
- package/skills/geopandas/references/data-io.md +323 -0
- package/skills/geopandas/references/data-structures.md +207 -0
- package/skills/geopandas/references/geometric-operations.md +262 -0
- package/skills/geopandas/references/spatial-analysis.md +294 -0
- package/skills/geopandas/references/visualization.md +230 -0
- package/skills/geopandas/scripts/_common.py +605 -0
- package/skills/geopandas/scripts/crs_reprojection_plan.py +210 -0
- package/skills/geopandas/scripts/export_plan.py +305 -0
- package/skills/geopandas/scripts/geometry_validity_report.py +227 -0
- package/skills/geopandas/scripts/sensitive_coordinates_checklist.py +230 -0
- package/skills/geopandas/scripts/spatial_join_audit.py +368 -0
- package/skills/geopandas/scripts/vector_inventory.py +140 -0
- package/skills/geopandas/skill.json +116 -0
- package/skills/geoparquet-validation/SKILL.md +125 -0
- package/skills/geoparquet-validation/UPSTREAM.md +24 -0
- package/skills/geoparquet-validation/references/distribution-best-practices.md +118 -0
- package/skills/geoparquet-validation/references/gpio-commands.md +264 -0
- package/skills/geoparquet-validation/references/tool-comparison.md +155 -0
- package/skills/geoparquet-validation/skill.json +71 -0
- package/skills/geospatial-data-discovery/SKILL.md +49 -0
- package/skills/geospatial-data-discovery/UPSTREAM.md +15 -0
- package/skills/geospatial-data-discovery/skill.json +51 -0
- package/skills/geospatial-frontend/SKILL.md +86 -0
- package/skills/geospatial-frontend/UPSTREAM.md +23 -0
- package/skills/geospatial-frontend/references/design-system.md +283 -0
- package/skills/geospatial-frontend/references/user-preferences.md +96 -0
- package/skills/geospatial-frontend/skill.json +87 -0
- package/skills/geozarr/SKILL.md +244 -0
- package/skills/geozarr/UPSTREAM.md +21 -0
- package/skills/geozarr/skill.json +97 -0
- package/skills/networkx/SKILL.md +440 -0
- package/skills/networkx/UPSTREAM.md +22 -0
- package/skills/networkx/references/algorithms.md +384 -0
- package/skills/networkx/references/generators.md +385 -0
- package/skills/networkx/references/graph-basics.md +284 -0
- package/skills/networkx/references/io.md +457 -0
- package/skills/networkx/references/visualization.md +531 -0
- package/skills/networkx/skill.json +93 -0
- package/skills/raster-processing/SKILL.md +222 -0
- package/skills/raster-processing/UPSTREAM.md +7 -0
- package/skills/raster-processing/skill.json +81 -0
- package/skills/sar-basics/SKILL.md +202 -0
- package/skills/sar-basics/UPSTREAM.md +7 -0
- package/skills/sar-basics/references/calibration-lut.md +98 -0
- package/skills/sar-basics/skill.json +97 -0
- package/skills/satellite-preprocessing/SKILL.md +241 -0
- package/skills/satellite-preprocessing/UPSTREAM.md +7 -0
- package/skills/satellite-preprocessing/skill.json +84 -0
- package/skills/scientific-visualization/SKILL.md +285 -0
- package/skills/scientific-visualization/UPSTREAM.md +25 -0
- package/skills/scientific-visualization/assets/color_palettes.py +263 -0
- package/skills/scientific-visualization/assets/nature.mplstyle +68 -0
- package/skills/scientific-visualization/assets/presentation.mplstyle +68 -0
- package/skills/scientific-visualization/assets/publication.mplstyle +77 -0
- package/skills/scientific-visualization/assets/publisher_profiles.json +269 -0
- package/skills/scientific-visualization/references/color_palettes.md +227 -0
- package/skills/scientific-visualization/references/journal_requirements.md +169 -0
- package/skills/scientific-visualization/references/matplotlib_examples.md +336 -0
- package/skills/scientific-visualization/references/publication_guidelines.md +196 -0
- package/skills/scientific-visualization/references/sources.md +76 -0
- package/skills/scientific-visualization/scripts/_common.py +136 -0
- package/skills/scientific-visualization/scripts/export_plan.py +493 -0
- package/skills/scientific-visualization/scripts/figure_export.py +642 -0
- package/skills/scientific-visualization/scripts/image_metadata.py +731 -0
- package/skills/scientific-visualization/scripts/palette_audit.py +327 -0
- package/skills/scientific-visualization/scripts/style_presets.py +501 -0
- package/skills/scientific-visualization/scripts/style_preview.py +232 -0
- package/skills/scientific-visualization/skill.json +95 -0
- package/skills/spectral-indices/SKILL.md +235 -0
- package/skills/spectral-indices/UPSTREAM.md +7 -0
- package/skills/spectral-indices/skill.json +88 -0
- package/skills/stac-and-cloud-access/SKILL.md +209 -0
- package/skills/stac-and-cloud-access/UPSTREAM.md +7 -0
- package/skills/stac-and-cloud-access/references/run-manifest.md +94 -0
- package/skills/stac-and-cloud-access/skill.json +98 -0
- package/skills/statistical-analysis/SKILL.md +446 -0
- package/skills/statistical-analysis/UPSTREAM.md +24 -0
- package/skills/statistical-analysis/references/assumptions_and_diagnostics.md +379 -0
- package/skills/statistical-analysis/references/bayesian_statistics.md +686 -0
- package/skills/statistical-analysis/references/effect_sizes_and_power.md +649 -0
- package/skills/statistical-analysis/references/reporting_standards.md +482 -0
- package/skills/statistical-analysis/references/test_selection_guide.md +129 -0
- package/skills/statistical-analysis/scripts/assumption_checks.py +652 -0
- package/skills/statistical-analysis/skill.json +127 -0
- package/skills/systematic-debugging/SKILL.md +283 -0
- package/skills/systematic-debugging/UPSTREAM.md +28 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +72 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/systematic-debugging/skill.json +88 -0
- package/skills/time-series-and-change/SKILL.md +217 -0
- package/skills/time-series-and-change/UPSTREAM.md +7 -0
- package/skills/time-series-and-change/references/change-methods.md +42 -0
- package/skills/time-series-and-change/skill.json +116 -0
- package/skills/vector-quality/SKILL.md +204 -0
- package/skills/vector-quality/UPSTREAM.md +7 -0
- package/skills/vector-quality/skill.json +82 -0
- package/skills/verification/SKILL.md +120 -0
- package/skills/verification/UPSTREAM.md +31 -0
- package/skills/verification/skill.json +67 -0
- package/skills/writing-plans/SKILL.md +171 -0
- package/skills/writing-plans/UPSTREAM.md +23 -0
- package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/skills/writing-plans/skill.json +80 -0
- package/sources/SOURCES.md +374 -0
- package/third_party/isaaccorley-geospatial-skills/LICENSE +176 -0
- package/third_party/isaaccorley-geospatial-skills/NOTICE.md +17 -0
- package/third_party/kdense-scientific-agent-skills/LICENSE +21 -0
- package/third_party/kdense-scientific-agent-skills/NOTICE.md +19 -0
- package/third_party/superpowers/LICENSE +21 -0
- package/third_party/superpowers/NOTICE.md +17 -0
- package/third_party/timescale-pg-aiguide/LICENSE +176 -0
- package/third_party/timescale-pg-aiguide/NOTICE.md +14 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Presentation/Poster style
|
|
2
|
+
# Usage: plt.style.use('presentation.mplstyle')
|
|
3
|
+
#
|
|
4
|
+
# Larger fonts and thicker lines for presentations,
|
|
5
|
+
# posters, and projected displays
|
|
6
|
+
# Reviewed with Matplotlib 3.11.1 on 2026-07-23.
|
|
7
|
+
|
|
8
|
+
# Figure properties
|
|
9
|
+
figure.dpi: 100
|
|
10
|
+
figure.facecolor: white
|
|
11
|
+
figure.constrained_layout.use: False
|
|
12
|
+
figure.figsize: 8, 6
|
|
13
|
+
|
|
14
|
+
# Font properties (larger for visibility)
|
|
15
|
+
font.size: 14
|
|
16
|
+
font.family: sans-serif
|
|
17
|
+
font.sans-serif: Arial, Helvetica, Calibri, DejaVu Sans
|
|
18
|
+
|
|
19
|
+
# Axes properties
|
|
20
|
+
axes.linewidth: 1.5
|
|
21
|
+
axes.labelsize: 16
|
|
22
|
+
axes.titlesize: 18
|
|
23
|
+
axes.labelweight: normal
|
|
24
|
+
axes.spines.top: False
|
|
25
|
+
axes.spines.right: False
|
|
26
|
+
axes.edgecolor: black
|
|
27
|
+
axes.axisbelow: True
|
|
28
|
+
axes.grid: False
|
|
29
|
+
axes.prop_cycle: cycler('color', ['0072B2', 'D55E00', '009E73', 'CC79A7', '000000'])
|
|
30
|
+
|
|
31
|
+
# Tick properties
|
|
32
|
+
xtick.major.size: 6
|
|
33
|
+
xtick.minor.size: 4
|
|
34
|
+
xtick.major.width: 1.5
|
|
35
|
+
xtick.minor.width: 1.0
|
|
36
|
+
xtick.labelsize: 12
|
|
37
|
+
xtick.direction: out
|
|
38
|
+
ytick.major.size: 6
|
|
39
|
+
ytick.minor.size: 4
|
|
40
|
+
ytick.major.width: 1.5
|
|
41
|
+
ytick.minor.width: 1.0
|
|
42
|
+
ytick.labelsize: 12
|
|
43
|
+
ytick.direction: out
|
|
44
|
+
|
|
45
|
+
# Line properties
|
|
46
|
+
lines.linewidth: 2.5
|
|
47
|
+
lines.markersize: 8
|
|
48
|
+
lines.markeredgewidth: 1.0
|
|
49
|
+
|
|
50
|
+
# Legend properties
|
|
51
|
+
legend.fontsize: 12
|
|
52
|
+
legend.frameon: False
|
|
53
|
+
|
|
54
|
+
# Save properties
|
|
55
|
+
savefig.dpi: 300
|
|
56
|
+
savefig.format: png
|
|
57
|
+
savefig.bbox: standard
|
|
58
|
+
savefig.pad_inches: 0.1
|
|
59
|
+
savefig.transparent: False
|
|
60
|
+
savefig.facecolor: white
|
|
61
|
+
savefig.edgecolor: white
|
|
62
|
+
|
|
63
|
+
pdf.fonttype: 42
|
|
64
|
+
ps.fonttype: 42
|
|
65
|
+
svg.fonttype: none
|
|
66
|
+
|
|
67
|
+
# Image properties
|
|
68
|
+
image.cmap: viridis
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# General scientific-publication starting style
|
|
2
|
+
# Usage: plt.style.use('publication.mplstyle')
|
|
3
|
+
#
|
|
4
|
+
# Reviewed with Matplotlib 3.11.1 on 2026-07-23.
|
|
5
|
+
# This is not a journal-compliance profile.
|
|
6
|
+
|
|
7
|
+
# Figure properties
|
|
8
|
+
figure.dpi: 100
|
|
9
|
+
figure.facecolor: white
|
|
10
|
+
figure.autolayout: False
|
|
11
|
+
figure.constrained_layout.use: False
|
|
12
|
+
figure.figsize: 3.5, 2.5
|
|
13
|
+
|
|
14
|
+
# Font properties
|
|
15
|
+
font.size: 8
|
|
16
|
+
font.family: sans-serif
|
|
17
|
+
font.sans-serif: Arial, Helvetica, DejaVu Sans
|
|
18
|
+
|
|
19
|
+
# Axes properties
|
|
20
|
+
axes.linewidth: 0.6
|
|
21
|
+
axes.labelsize: 8
|
|
22
|
+
axes.titlesize: 8
|
|
23
|
+
axes.labelweight: normal
|
|
24
|
+
axes.spines.top: False
|
|
25
|
+
axes.spines.right: False
|
|
26
|
+
axes.spines.left: True
|
|
27
|
+
axes.spines.bottom: True
|
|
28
|
+
axes.edgecolor: black
|
|
29
|
+
axes.labelcolor: black
|
|
30
|
+
axes.axisbelow: True
|
|
31
|
+
axes.grid: False
|
|
32
|
+
# Five Okabe-Ito colors that meet 3:1 against white in sRGB.
|
|
33
|
+
# Still add markers, line styles, hatching, or direct labels.
|
|
34
|
+
axes.prop_cycle: cycler('color', ['0072B2', 'D55E00', '009E73', 'CC79A7', '000000'])
|
|
35
|
+
|
|
36
|
+
# Tick properties
|
|
37
|
+
xtick.major.size: 3
|
|
38
|
+
xtick.minor.size: 2
|
|
39
|
+
xtick.major.width: 0.6
|
|
40
|
+
xtick.minor.width: 0.5
|
|
41
|
+
xtick.labelsize: 7
|
|
42
|
+
xtick.direction: out
|
|
43
|
+
ytick.major.size: 3
|
|
44
|
+
ytick.minor.size: 2
|
|
45
|
+
ytick.major.width: 0.6
|
|
46
|
+
ytick.minor.width: 0.5
|
|
47
|
+
ytick.labelsize: 7
|
|
48
|
+
ytick.direction: out
|
|
49
|
+
|
|
50
|
+
# Line properties
|
|
51
|
+
lines.linewidth: 1.5
|
|
52
|
+
lines.markersize: 4
|
|
53
|
+
lines.markeredgewidth: 0.5
|
|
54
|
+
|
|
55
|
+
# Legend properties
|
|
56
|
+
legend.fontsize: 7
|
|
57
|
+
legend.frameon: False
|
|
58
|
+
legend.loc: best
|
|
59
|
+
|
|
60
|
+
# Save properties
|
|
61
|
+
savefig.dpi: 300
|
|
62
|
+
savefig.format: pdf
|
|
63
|
+
# "tight" changes physical output dimensions; request it explicitly if wanted.
|
|
64
|
+
savefig.bbox: standard
|
|
65
|
+
savefig.pad_inches: 0.05
|
|
66
|
+
savefig.transparent: False
|
|
67
|
+
savefig.facecolor: white
|
|
68
|
+
savefig.edgecolor: white
|
|
69
|
+
|
|
70
|
+
# Editable TrueType text in PDF/PS. SVG text stays as text and is not embedded.
|
|
71
|
+
pdf.fonttype: 42
|
|
72
|
+
ps.fonttype: 42
|
|
73
|
+
svg.fonttype: none
|
|
74
|
+
|
|
75
|
+
# Image properties
|
|
76
|
+
image.cmap: viridis
|
|
77
|
+
image.aspect: auto
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1.0",
|
|
3
|
+
"accessed": "2026-07-23",
|
|
4
|
+
"notice": "Dated publisher snapshots for planning only. They do not establish submission compliance; verify the target journal, article type, and submission stage.",
|
|
5
|
+
"profiles": {
|
|
6
|
+
"nature": {
|
|
7
|
+
"label": "Nature (flagship)",
|
|
8
|
+
"scope": "Final submission after acceptance in principle",
|
|
9
|
+
"phase": "final",
|
|
10
|
+
"journal_specific": true,
|
|
11
|
+
"sources": [
|
|
12
|
+
"https://www.nature.com/nature/for-authors/final-submission",
|
|
13
|
+
"https://research-figure-guide.nature.com/figures/preparing-figures-our-specifications"
|
|
14
|
+
],
|
|
15
|
+
"widths_mm": {
|
|
16
|
+
"single": 89.0,
|
|
17
|
+
"one-and-half-min": 120.0,
|
|
18
|
+
"one-and-half-max": 136.0,
|
|
19
|
+
"full": 183.0
|
|
20
|
+
},
|
|
21
|
+
"max_height_mm": 247.0,
|
|
22
|
+
"formats": {
|
|
23
|
+
"line-art": ["pdf", "eps", "ai", "ps"],
|
|
24
|
+
"photo": ["psd", "tiff", "jpeg"],
|
|
25
|
+
"combination": ["pdf", "eps", "ai", "ps"]
|
|
26
|
+
},
|
|
27
|
+
"raster_dpi": {
|
|
28
|
+
"photo": {"min": 300.0, "max": 600.0},
|
|
29
|
+
"line-art": null,
|
|
30
|
+
"combination": null
|
|
31
|
+
},
|
|
32
|
+
"color_modes": ["RGB", "CMYK"],
|
|
33
|
+
"preferred_color_mode": "RGB",
|
|
34
|
+
"max_file_bytes": null,
|
|
35
|
+
"notes": [
|
|
36
|
+
"Keep line art, text, and labels editable rather than rasterizing or outlining them.",
|
|
37
|
+
"The companion research-figure guide says image exports should be at least 450 dpi; the flagship final-submission page accepts photographic images at 300-600 dpi.",
|
|
38
|
+
"Panel labels are lowercase, bold, upright, 8 pt; other text is 5-7 pt at final size."
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"science": {
|
|
42
|
+
"label": "Science (AAAS)",
|
|
43
|
+
"scope": "Revised manuscript figures",
|
|
44
|
+
"phase": "revised",
|
|
45
|
+
"journal_specific": true,
|
|
46
|
+
"sources": [
|
|
47
|
+
"https://www.science.org/content/page/instructions-preparing-initial-manuscript",
|
|
48
|
+
"https://www.science.org/content/page/instructions-preparing-revised-manuscript"
|
|
49
|
+
],
|
|
50
|
+
"widths_mm": {
|
|
51
|
+
"single": 57.0,
|
|
52
|
+
"double": 121.0,
|
|
53
|
+
"full": 184.0
|
|
54
|
+
},
|
|
55
|
+
"max_height_mm": null,
|
|
56
|
+
"formats": {
|
|
57
|
+
"line-art": ["pdf", "eps", "ai"],
|
|
58
|
+
"photo": ["tiff"],
|
|
59
|
+
"combination": ["pdf", "eps"]
|
|
60
|
+
},
|
|
61
|
+
"raster_dpi": {
|
|
62
|
+
"photo": {"min": 300.0},
|
|
63
|
+
"line-art": {"min": 300.0},
|
|
64
|
+
"combination": {"min": 300.0}
|
|
65
|
+
},
|
|
66
|
+
"color_modes": null,
|
|
67
|
+
"preferred_color_mode": null,
|
|
68
|
+
"max_file_bytes": null,
|
|
69
|
+
"notes": [
|
|
70
|
+
"Initial-submission figures may be embedded and should be 300 dpi; revised figures are uploaded separately.",
|
|
71
|
+
"Revised guidance prefers vectors and prohibits upsampling.",
|
|
72
|
+
"Lettering should be about 7 pt after reduction and never smaller than 5 pt."
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"cell": {
|
|
76
|
+
"label": "Cell Press",
|
|
77
|
+
"scope": "Final production files for most Cell Press journals",
|
|
78
|
+
"phase": "final",
|
|
79
|
+
"journal_specific": false,
|
|
80
|
+
"sources": [
|
|
81
|
+
"https://www.cell.com/information-for-authors/figure-guidelines"
|
|
82
|
+
],
|
|
83
|
+
"widths_mm": {
|
|
84
|
+
"single": 85.0,
|
|
85
|
+
"one-and-half": 114.0,
|
|
86
|
+
"full": 174.0
|
|
87
|
+
},
|
|
88
|
+
"max_height_mm": 200.0,
|
|
89
|
+
"formats": {
|
|
90
|
+
"line-art": ["pdf", "tiff", "eps"],
|
|
91
|
+
"photo": ["tiff", "pdf", "jpeg"],
|
|
92
|
+
"combination": ["pdf", "tiff", "eps"]
|
|
93
|
+
},
|
|
94
|
+
"raster_dpi": {
|
|
95
|
+
"photo": {"min": 300.0},
|
|
96
|
+
"line-art": {"min": 1000.0},
|
|
97
|
+
"combination": null,
|
|
98
|
+
"black-and-white": {"min": 500.0}
|
|
99
|
+
},
|
|
100
|
+
"color_modes": ["RGB"],
|
|
101
|
+
"preferred_color_mode": "RGB",
|
|
102
|
+
"max_file_bytes": 20000000,
|
|
103
|
+
"notes": [
|
|
104
|
+
"Widths apply to two-column article formats; three-column formats differ.",
|
|
105
|
+
"TIFF and PDF are preferred for most final production files; exceptions include STAR Protocols and Cell Leading Edge.",
|
|
106
|
+
"The 16.5 by 20 cm overall size is a recommendation, not a universal hard limit.",
|
|
107
|
+
"Use Arial, capital panel labels, and about 6-8 pt text at final size."
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"plos": {
|
|
111
|
+
"label": "PLOS research journals",
|
|
112
|
+
"scope": "Figures after provisional Editorial Accept (PLOS Computational Biology snapshot)",
|
|
113
|
+
"phase": "post-provisional-accept",
|
|
114
|
+
"journal_specific": false,
|
|
115
|
+
"sources": [
|
|
116
|
+
"https://journals.plos.org/ploscompbiol/s/figures"
|
|
117
|
+
],
|
|
118
|
+
"widths_mm": {
|
|
119
|
+
"minimum": 66.8,
|
|
120
|
+
"text-column": 132.0,
|
|
121
|
+
"full": 190.5
|
|
122
|
+
},
|
|
123
|
+
"width_range_px_at_300_dpi": [789, 2250],
|
|
124
|
+
"max_height_mm": 222.3,
|
|
125
|
+
"max_height_px_at_300_dpi": 2625,
|
|
126
|
+
"formats": {
|
|
127
|
+
"line-art": ["eps", "tiff"],
|
|
128
|
+
"photo": ["tiff"],
|
|
129
|
+
"combination": ["eps", "tiff"]
|
|
130
|
+
},
|
|
131
|
+
"raster_dpi": {
|
|
132
|
+
"photo": {"min": 300.0, "max": 600.0},
|
|
133
|
+
"line-art": {"min": 300.0, "max": 600.0},
|
|
134
|
+
"combination": {"min": 300.0, "max": 600.0}
|
|
135
|
+
},
|
|
136
|
+
"color_modes": ["RGB", "L"],
|
|
137
|
+
"preferred_color_mode": "RGB",
|
|
138
|
+
"max_file_bytes": null,
|
|
139
|
+
"max_file_bytes_exclusive": 10000000,
|
|
140
|
+
"notes": [
|
|
141
|
+
"PLOS waives formatting requirements until provisional Editorial Accept.",
|
|
142
|
+
"Use Arial, Times, or Symbol at 8-12 pt; combine all panels for one figure into one file.",
|
|
143
|
+
"The cited page states TIFF or EPS only and requires RGB 8-bit/channel or grayscale.",
|
|
144
|
+
"The <10 MB rule is screened as <10,000,000 bytes; verify how the submission portal reports MB."
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
"elsevier": {
|
|
148
|
+
"label": "Elsevier general artwork guidance",
|
|
149
|
+
"scope": "Publisher-general defaults; target journals may override them",
|
|
150
|
+
"phase": "final",
|
|
151
|
+
"journal_specific": false,
|
|
152
|
+
"sources": [
|
|
153
|
+
"https://www.elsevier.com/about/policies-and-standards/author/artwork-and-media-instructions/artwork-formats-checklist",
|
|
154
|
+
"https://www.elsevier.com/about/policies-and-standards/author/artwork-and-media-instructions/artwork-sizing"
|
|
155
|
+
],
|
|
156
|
+
"widths_mm": {
|
|
157
|
+
"minimum": 30.0,
|
|
158
|
+
"single": 90.0,
|
|
159
|
+
"one-and-half": 140.0,
|
|
160
|
+
"full": 190.0
|
|
161
|
+
},
|
|
162
|
+
"max_height_mm": null,
|
|
163
|
+
"formats": {
|
|
164
|
+
"line-art": ["eps", "pdf"],
|
|
165
|
+
"photo": ["tiff", "jpeg"],
|
|
166
|
+
"combination": ["eps", "pdf", "tiff"]
|
|
167
|
+
},
|
|
168
|
+
"raster_dpi": {
|
|
169
|
+
"photo": {"min": 300.0},
|
|
170
|
+
"line-art": {"min": 1000.0},
|
|
171
|
+
"combination": {"min": 500.0}
|
|
172
|
+
},
|
|
173
|
+
"color_modes": ["RGB"],
|
|
174
|
+
"preferred_color_mode": "RGB",
|
|
175
|
+
"max_file_bytes": null,
|
|
176
|
+
"notes": [
|
|
177
|
+
"Elsevier explicitly directs authors to the target journal's Guide for Authors for overrides.",
|
|
178
|
+
"Normal lettering is generally 7 pt at final size; 6 pt is a rule-of-thumb floor for subscripts and superscripts."
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"ieee": {
|
|
182
|
+
"label": "IEEE journals",
|
|
183
|
+
"scope": "IEEE Author Center journal graphics guidance",
|
|
184
|
+
"phase": "submission",
|
|
185
|
+
"journal_specific": false,
|
|
186
|
+
"sources": [
|
|
187
|
+
"https://journals.ieeeauthorcenter.ieee.org/create-your-ieee-journal-article/create-graphics-for-your-article/resolution-and-size/"
|
|
188
|
+
],
|
|
189
|
+
"widths_mm": {
|
|
190
|
+
"single": 88.9,
|
|
191
|
+
"full": 182.0
|
|
192
|
+
},
|
|
193
|
+
"max_height_mm": null,
|
|
194
|
+
"formats": {
|
|
195
|
+
"line-art": ["ps", "eps", "pdf"],
|
|
196
|
+
"photo": [],
|
|
197
|
+
"combination": ["ps", "eps", "pdf"]
|
|
198
|
+
},
|
|
199
|
+
"raster_dpi": {
|
|
200
|
+
"photo": {"min_exclusive": 300.0},
|
|
201
|
+
"line-art": {"min_exclusive": 600.0},
|
|
202
|
+
"combination": {"min_exclusive": 300.0}
|
|
203
|
+
},
|
|
204
|
+
"color_modes": null,
|
|
205
|
+
"preferred_color_mode": null,
|
|
206
|
+
"max_file_bytes": null,
|
|
207
|
+
"notes": [
|
|
208
|
+
"The cited page identifies PS, EPS, and PDF as acceptable vector formats.",
|
|
209
|
+
"IEEE states greater than 300 dpi for non-vector color/grayscale and greater than 600 dpi for black-and-white line art."
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
"bmc": {
|
|
213
|
+
"label": "BMC journal example",
|
|
214
|
+
"scope": "BMC Bioinformatics preparing-your-manuscript guidance; verify the target BMC journal",
|
|
215
|
+
"phase": "submission",
|
|
216
|
+
"journal_specific": true,
|
|
217
|
+
"sources": [
|
|
218
|
+
"https://bmcbioinformatics.biomedcentral.com/submission-guidelines/preparing-your-manuscript"
|
|
219
|
+
],
|
|
220
|
+
"widths_mm": {
|
|
221
|
+
"half": 85.0,
|
|
222
|
+
"full": 170.0
|
|
223
|
+
},
|
|
224
|
+
"max_height_mm": 225.0,
|
|
225
|
+
"formats": {
|
|
226
|
+
"line-art": ["eps", "pdf"],
|
|
227
|
+
"photo": ["tiff", "jpeg", "png", "bmp"],
|
|
228
|
+
"combination": ["eps", "pdf"]
|
|
229
|
+
},
|
|
230
|
+
"raster_dpi": {
|
|
231
|
+
"photo": {"target": 300.0},
|
|
232
|
+
"line-art": {"target": 300.0},
|
|
233
|
+
"combination": {"target": 300.0}
|
|
234
|
+
},
|
|
235
|
+
"color_modes": null,
|
|
236
|
+
"preferred_color_mode": null,
|
|
237
|
+
"max_file_bytes": 10000000,
|
|
238
|
+
"notes": [
|
|
239
|
+
"The source says approximately 300 dpi at final size, not a universal minimum.",
|
|
240
|
+
"Figures are 600 px standard or 1200 px high-resolution on the web.",
|
|
241
|
+
"All fonts must be embedded and lines should be wider than 0.25 pt at final width."
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
"acs": {
|
|
245
|
+
"label": "ACS Publications general graphics page",
|
|
246
|
+
"scope": "General manuscript-graphics sizing; consult the selected ACS journal",
|
|
247
|
+
"phase": "submission",
|
|
248
|
+
"journal_specific": false,
|
|
249
|
+
"sources": [
|
|
250
|
+
"https://pubs.acs.org/page/4authors/submission/graphics_prep.html"
|
|
251
|
+
],
|
|
252
|
+
"widths_mm": {
|
|
253
|
+
"single": 82.55,
|
|
254
|
+
"full": 177.8
|
|
255
|
+
},
|
|
256
|
+
"max_height_mm": 241.3,
|
|
257
|
+
"formats": null,
|
|
258
|
+
"raster_dpi": null,
|
|
259
|
+
"color_modes": null,
|
|
260
|
+
"preferred_color_mode": null,
|
|
261
|
+
"max_file_bytes": null,
|
|
262
|
+
"notes": [
|
|
263
|
+
"The general page gives 3.25-inch and 7-inch widths but does not establish a current universal digital format/DPI profile.",
|
|
264
|
+
"It recommends lettering no smaller than 5 pt after reduction and lines no thinner than 1 pt.",
|
|
265
|
+
"Use the target ACS journal's current Author Guidelines for binding technical requirements."
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# Color, Contrast, and Palette Selection
|
|
2
|
+
|
|
3
|
+
Reviewed 2026-07-23. Source IDs resolve in `sources.md`. A named “colorblind-safe” palette is not a guarantee that a rendered figure is accessible: background, line thickness, adjacency, text, category count, display/print conversion, and redundant encoding all matter.
|
|
4
|
+
|
|
5
|
+
## Start with data semantics
|
|
6
|
+
|
|
7
|
+
- **Qualitative:** unordered categories. Hue can separate groups; lightness should not imply an unintended ranking.
|
|
8
|
+
- **Sequential:** ordered low-to-high values. Use monotonic perceived lightness.
|
|
9
|
+
- **Diverging:** departure around a meaningful center. Use a neutral midpoint and document the normalization.
|
|
10
|
+
- **Cyclic:** periodic values where endpoints meet.
|
|
11
|
+
|
|
12
|
+
Do not use a diverging map merely because values contain positive and negative numbers; the center must have scientific meaning. Do not use a rainbow map as a generic ordered scale. Paul Tol documents false visual transitions, lack of inherent magnitude ordering, and color-vision problems in ordinary rainbow schemes [TOL].
|
|
13
|
+
|
|
14
|
+
With Matplotlib, colormap and normalization are separate:
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
import matplotlib as mpl
|
|
18
|
+
|
|
19
|
+
norm = mpl.colors.TwoSlopeNorm(vmin=-2, vcenter=0, vmax=5)
|
|
20
|
+
image = ax.imshow(values, cmap="RdBu_r", norm=norm)
|
|
21
|
+
fig.colorbar(image, ax=ax, label="Change (unit)")
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Use `LogNorm` for strictly positive orders of magnitude, `SymLogNorm` for signed data with a disclosed linear zone, `BoundaryNorm` for meaningful classes, and `TwoSlopeNorm` for unequal ranges around a center [MPL-NORM].
|
|
25
|
+
|
|
26
|
+
## Okabe-Ito / Wong colors
|
|
27
|
+
|
|
28
|
+
The eight colors commonly reproduced from Wong’s Nature Methods article are [WONG]:
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
OKABE_ITO = [
|
|
32
|
+
"#E69F00", # orange
|
|
33
|
+
"#56B4E9", # sky blue
|
|
34
|
+
"#009E73", # bluish green
|
|
35
|
+
"#F0E442", # yellow
|
|
36
|
+
"#0072B2", # blue
|
|
37
|
+
"#D55E00", # vermillion
|
|
38
|
+
"#CC79A7", # reddish purple
|
|
39
|
+
"#000000", # black
|
|
40
|
+
]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Several light colors do not reach 3:1 against white. For thin lines or required graphical objects on white, start with the bundled five-color subset:
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
OKABE_ITO_ON_WHITE = [
|
|
47
|
+
"#0072B2",
|
|
48
|
+
"#D55E00",
|
|
49
|
+
"#009E73",
|
|
50
|
+
"#CC79A7",
|
|
51
|
+
"#000000",
|
|
52
|
+
]
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
This subset is derived by WCAG sRGB contrast calculation; it is not a published palette or a compliance certification. Use marker/line-style redundancy and audit the actual rendering.
|
|
56
|
+
|
|
57
|
+
## Paul Tol qualitative schemes
|
|
58
|
+
|
|
59
|
+
Paul Tol’s canonical site moved to `sronpersonalpages.nl` in July 2026. The current technical note remains SRON/EPS/TN/09-002, issue 3.2, dated 2021-08-18 [TOL] [TOL-HOME].
|
|
60
|
+
|
|
61
|
+
The note states that the bright, high-contrast, vibrant, muted, and medium-contrast qualitative schemes are color-blind safe under its design/testing assumptions. It also states:
|
|
62
|
+
|
|
63
|
+
- high-contrast is the strongest choice for grayscale/monochrome separation;
|
|
64
|
+
- medium-contrast provides three pairs but weaker grayscale separation;
|
|
65
|
+
- light is reasonably distinct and intended mainly for labeled cell fills;
|
|
66
|
+
- pale/dark are not sufficiently distinct for multi-series lines or maps and are meant for text backgrounds/foregrounds;
|
|
67
|
+
- most multi-color qualitative schemes do not remain fully separable in grayscale.
|
|
68
|
+
|
|
69
|
+
Bundled fixed-order values:
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
TOL_BRIGHT = [
|
|
73
|
+
"#4477AA", "#EE6677", "#228833", "#CCBB44",
|
|
74
|
+
"#66CCEE", "#AA3377", "#BBBBBB",
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
TOL_HIGH_CONTRAST = ["#004488", "#DDAA33", "#BB5566"]
|
|
78
|
+
|
|
79
|
+
TOL_VIBRANT = [
|
|
80
|
+
"#EE7733", "#0077BB", "#33BBEE", "#EE3377",
|
|
81
|
+
"#CC3311", "#009988", "#BBBBBB",
|
|
82
|
+
]
|
|
83
|
+
|
|
84
|
+
TOL_MUTED = [
|
|
85
|
+
"#CC6677", "#332288", "#DDCC77", "#117733", "#88CCEE",
|
|
86
|
+
"#882255", "#44AA99", "#999933", "#AA4499",
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
TOL_MEDIUM_CONTRAST = [
|
|
90
|
+
"#6699CC", "#004488", "#EECC66",
|
|
91
|
+
"#994455", "#997700", "#EE99AA",
|
|
92
|
+
]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The maximum intended series counts are 7, 3, 7, 9, and 6 respectively. Do not interpolate qualitative palettes.
|
|
96
|
+
|
|
97
|
+
## ColorBrewer
|
|
98
|
+
|
|
99
|
+
ColorBrewer 2.0 is an authoritative interactive resource for sequential, diverging, and qualitative cartographic schemes. It allows filtering by “colorblind safe,” “print friendly,” and “photocopy safe,” and exposes the supported number of data classes [COLORBREWER].
|
|
100
|
+
|
|
101
|
+
Use the exact class count shown by ColorBrewer. A scheme marked safe at one class count may not be marked safe at another. ColorBrewer’s flags are design guidance for its intended mapping context, not a WCAG conformance result for arbitrary line widths, backgrounds, or text.
|
|
102
|
+
|
|
103
|
+
Matplotlib exposes many ColorBrewer-derived maps. Verify the exact map direction and class count rather than relying on its name.
|
|
104
|
+
|
|
105
|
+
## Perceptually uniform continuous maps
|
|
106
|
+
|
|
107
|
+
Matplotlib recommends selecting maps based on data semantics and discusses lightness behavior in its colormap guide [MPL-CMAP]. Common continuous candidates:
|
|
108
|
+
|
|
109
|
+
- `viridis`, `plasma`, `inferno`, `magma`: perceptually uniform sequential families;
|
|
110
|
+
- `cividis`: designed with color-vision deficiencies in mind;
|
|
111
|
+
- `RdBu_r`, `PuOr`, `BrBG`: possible diverging candidates after checking the center, direction, contrast, and grayscale behavior.
|
|
112
|
+
|
|
113
|
+
No list is universally safe. A map can be perceptually uniform yet still fail to distinguish a narrow feature at the chosen size, or lose detail during RGB-to-CMYK conversion.
|
|
114
|
+
|
|
115
|
+
## WCAG contrast: what to test
|
|
116
|
+
|
|
117
|
+
WCAG 2.2 is normative for web content [WCAG22]:
|
|
118
|
+
|
|
119
|
+
- normal text: 4.5:1 against its background (SC 1.4.3 AA);
|
|
120
|
+
- large text: 3:1 (SC 1.4.3 AA);
|
|
121
|
+
- graphical objects required to understand content: 3:1 against adjacent colors (SC 1.4.11 AA);
|
|
122
|
+
- color must not be the only visual means of conveying information (SC 1.4.1 A).
|
|
123
|
+
|
|
124
|
+
W3C’s understanding document uses line and pie charts as examples and explains that required graphical objects are tested against adjacent colors; all data-series colors do not automatically need 3:1 against each other when they do not overlap [WCAG-NONTEXT].
|
|
125
|
+
|
|
126
|
+
Run:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
uv run --isolated --no-project --python 3.13 \
|
|
130
|
+
python scripts/palette_audit.py \
|
|
131
|
+
--palette okabe_ito_on_white \
|
|
132
|
+
--background FFFFFF \
|
|
133
|
+
--role graphical
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The CLI reports:
|
|
137
|
+
|
|
138
|
+
- exact WCAG sRGB contrast against the chosen background;
|
|
139
|
+
- pairwise contrast;
|
|
140
|
+
- pairwise CIE L* separation after removing hue.
|
|
141
|
+
|
|
142
|
+
Its default grayscale threshold (ΔL* 10) is a heuristic. It is not a WCAG threshold and does not simulate every color-vision deficiency, printer, profile, or viewing condition.
|
|
143
|
+
|
|
144
|
+
## Redundant encoding
|
|
145
|
+
|
|
146
|
+
Use at least one non-color cue:
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
colors = ["#0072B2", "#D55E00", "#009E73"]
|
|
150
|
+
linestyles = ["-", "--", "-."]
|
|
151
|
+
markers = ["o", "s", "^"]
|
|
152
|
+
|
|
153
|
+
for index, series in enumerate(series_list):
|
|
154
|
+
ax.plot(
|
|
155
|
+
x,
|
|
156
|
+
series,
|
|
157
|
+
color=colors[index],
|
|
158
|
+
linestyle=linestyles[index],
|
|
159
|
+
marker=markers[index],
|
|
160
|
+
markevery=5,
|
|
161
|
+
label=labels[index],
|
|
162
|
+
)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
For bars, use edge contrast, labels, and restrained hatching. For images, consider accessible channel combinations plus separate grayscale panels. Direct labels often outperform distant legends.
|
|
166
|
+
|
|
167
|
+
## Missing and out-of-range colors
|
|
168
|
+
|
|
169
|
+
Assign explicit colors to missing and out-of-range values:
|
|
170
|
+
|
|
171
|
+
```python
|
|
172
|
+
import matplotlib as mpl
|
|
173
|
+
|
|
174
|
+
cmap = mpl.colormaps["viridis"].with_extremes(
|
|
175
|
+
bad="#777777",
|
|
176
|
+
under="#222222",
|
|
177
|
+
over="#FDE725",
|
|
178
|
+
)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Label these states in the colorbar/legend. Never let missing values default to the low end of a quantitative scale.
|
|
182
|
+
|
|
183
|
+
## Seaborn and Plotly
|
|
184
|
+
|
|
185
|
+
Seaborn 0.13.2 accepts palette names, lists, and dictionaries through `palette=`/`set_palette()`. Apply a Matplotlib style before Seaborn only if the subsequent `sns.set_theme()` call will not overwrite the intended rc settings; pass `rc=` explicitly when needed [SEABORN-PALETTE] [SEABORN-THEME].
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
import seaborn as sns
|
|
189
|
+
|
|
190
|
+
sns.set_theme(style="ticks", context="paper")
|
|
191
|
+
sns.set_palette(OKABE_ITO_ON_WHITE)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
For Plotly, set categorical colors explicitly and add symbols/dashes:
|
|
195
|
+
|
|
196
|
+
```python
|
|
197
|
+
fig = px.scatter(
|
|
198
|
+
frame,
|
|
199
|
+
x="x",
|
|
200
|
+
y="y",
|
|
201
|
+
color="group",
|
|
202
|
+
symbol="group",
|
|
203
|
+
color_discrete_sequence=OKABE_ITO_ON_WHITE,
|
|
204
|
+
)
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Check the static export too. Interactive hover does not replace contrast, labels, keyboard operation, alt text, or a static fallback.
|
|
208
|
+
|
|
209
|
+
## Color management
|
|
210
|
+
|
|
211
|
+
- Work in sRGB unless the publisher or calibrated workflow requires another space.
|
|
212
|
+
- Preserve ICC profiles in scientific raster images when relevant.
|
|
213
|
+
- Preview print conversion when the publisher converts RGB to CMYK.
|
|
214
|
+
- Do not alter raw intensity data merely to obtain attractive colors.
|
|
215
|
+
- Record channel mappings, color limits, normalization, and any color-space conversion.
|
|
216
|
+
- Avoid transparency when blending with an unknown background can change contrast.
|
|
217
|
+
|
|
218
|
+
## Review checklist
|
|
219
|
+
|
|
220
|
+
- [ ] Palette type matches data semantics.
|
|
221
|
+
- [ ] Center, limits, normalization, and missing-value color are explicit.
|
|
222
|
+
- [ ] Foreground/background contrast was audited at final size.
|
|
223
|
+
- [ ] Color is redundant with shape, line style, hatching, labels, or layout.
|
|
224
|
+
- [ ] Grayscale was inspected without treating it as a complete accessibility test.
|
|
225
|
+
- [ ] Print/profile conversion was reviewed when relevant.
|
|
226
|
+
- [ ] Palette and category mapping are consistent across figures.
|
|
227
|
+
- [ ] Underlying values and an accessible text/table alternative are available.
|