Portable figure generation
==========================

First generate the numerical outputs as described in reproduction/README.txt.
Figure 7 requires the full fixed-seed permutation run (full = TRUE).

source(system.file("figures", "render_figures.R", package = "SSIMmap"))
render_manuscript_figures("manuscript_reproduction")

The helper writes Figure_03.tiff through Figure_07.tiff into the figures
subdirectory, together with CSV audits of plotted values/classes. To render a
subset or use a different destination:

render_manuscript_figures("manuscript_reproduction",
                          output_dir = "figure_exports",
                          figures = c(5, 6, 7), overwrite = TRUE)

The default exports are 6.8-inch-wide, 600-dpi CMYK TIFF files with LZW
compression. They reproduce the scientific values, classes, panel order and
palettes with portable R layouts. They are not pixel-identical copies of the
separate journal print masters. CMYK conversion uses ImageMagick without an
assigned ICC print profile; a publisher-specific profile can be applied in a
separate color-managed workflow. Use colourspace = "RGB" for RGB TIFF output.
The helper requires sf, terra, ggplot2, patchwork and tidyterra, plus magick for
CMYK conversion. Install missing suggested packages manually; the helper never
installs them. It does not require QGIS or external GIS file paths.

Figure 3 uses the packaged BC_display_boundary.rds as a simplified display
outline. See BC_display_boundary_provenance.txt. This does not change the raster
mask or analysis values. Display reprojection uses nearest-neighbor sampling
for Figure 3 and bilinear sampling for Figure 4; analysis outputs retain the
native grid. Figure 5 uses exact quintile boundaries with rounded legend text.
Figure 6 reads the regenerated search-to-200 curves and selected bandwidths.
Figure 7 reads both observed SSIM and q-values from the full-run local results;
it never substitutes preserved legacy q-values.

Figures 1 and 2 are static workflow illustrations, supplied separately under
workflows; they are not outputs of the numerical analysis.
