Additional file 4. Figure-generation code and aggregate inputs

Study: Updated aortic valve mean gradient and first recorded gastrointestinal bleeding:
a retrospective hospital cohort study

Run from any directory with Python 3.10 or later:
  python -m pip install -r requirements.txt
  python render_figures.py

Outputs:
  figures/Figure_1.pdf to Figure_3.pdf: publication vector PDFs
  editable_eps/Figure_1.eps to Figure_3.eps: vector source exports
  png_previews/Figure_1.png to Figure_3.png: inspection previews

figure_data.json contains aggregate model estimates, confidence limits, counts,
the original fitted spline points, and the MG log-time coefficients and
time-specific effects used by the three main figures. Numbers are carried at
their supplied precision; displayed values are rounded only at plotting time.
The flow counts are explicitly specified in render_figures.py and match Table S1.

This archive reproduces the figures from aggregate inputs. It does not extract
MIMIC records, derive the cohort, refit the Cox/Firth models, or validate the
underlying participant-level database. Controlled source data are not included.
The original and last-discharge-boundary constructions retain their distinct
roles and denominators. Formal coefficient-time models are post hoc analyses.

Figures use Matplotlib and contain no generative clinical images. Font layout
may vary slightly across operating systems. Vector PDFs are the upload format.
