Expand description
Turn a processed elevation grid into drawable ridge lines.
Upstream plot_map draws row i at y = row - 6*i with a
background-colored fill from the baseline up to the line (the occlusion
trick that makes front ridges hide back ridges). RidgeScene captures
that geometry, plus the matplotlib figure layout (figure size, axes rect,
data limits) so the SVG exporter and the web canvas render identically.
Structs§
- Figure
Layout - Where the axes rect sits and how data maps into it.
- Ridge
Row - One ridge line: its baseline and y-values (
NaN= gap, no line drawn). - Ridge
Scene
Enums§
Constants§
- AXES_
MARGIN - matplotlib default axes margins (5% padding each side of the data).
- DEFAULT_
SIZE_ SCALE - matplotlib default
figure.figsizeused by upstream (size_scale=20). - FIG_DPI
- matplotlib default dpi used for px math (figsize is in inches).
- LINE_
SPACING - Upstream:
y_base = -6 * idx * np.ones_like(row). - SUBPLOT_
BOTTOM - SUBPLOT_
LEFT - matplotlib default
subplot_params(fractions of the figure). - SUBPLOT_
RIGHT - SUBPLOT_
TOP
Functions§
- build_
scene - Run the full pipeline: sample -> (optional rotate) -> preprocess -> scene.
- build_
scene_ fit - As
build_scene, with an explicitFit.Fit::Planealso skips the upstream axis swap (the client rotates a fixed-resolution plane), so the scene the browser recomputes locally matches the exported SVG exactly.