This repository holds the figures used in the book
Process Improvement using Data by Kevin Dunn, along
with the source scripts and editable artwork that produce them. It is a companion to the
book's text repository, kgdunn/pid-book, and to the
accompanying Python package, kgdunn/process-improve.
The figures live in their own repository, rather than inside the book, so that the same
image library can be shared across the book, slide decks, and other teaching material
without duplicating large binary files. The book checks this repository out as a symbolic
link named figures/, and its reStructuredText source then refers to images by paths such
as figures/doe/COST-contours.png.
Roughly 2000 rendered images (PNG, JPG, and SVG), together with the code and design files that generate them:
- Rendered output:
.png,.jpg, and.svgfiles. These are the images embedded in the book. - Generating scripts:
.py(matplotlib),.R, and.m(MATLAB) files that reproduce a plot from data. Where a figure is data-driven, its script sits next to it under the same name, for exampledoe/COST-contours.pyproducesdoe/COST-contours.png. - Editable artwork:
.svgvector sources for hand-drawn diagrams,.pxm(Pixelmator) raster sources, and.xmindfiles for the mind maps. - Small supporting data: a few
.csvand.datfiles used by the scripts.
Files are grouped into topic folders, not one folder per book chapter. A single chapter
usually draws on several topic folders, and some folders (for example doe/ and
least-squares/) also supply figures to other courses and talks. The main folders are:
| Folder | Contents |
|---|---|
univariate/ |
Univariate statistics: distributions, confidence intervals, control-chart precursors |
visualization/ |
Data visualization: time-series, scatter and bubble plots, tables |
least-squares/ |
Least squares and regression: fits, residuals, leverage, ANOVA |
doe/ |
Design and analysis of experiments: factorials, fractional factorials, response surfaces, optimal / DSD / OMARS designs |
pca/, pls/, multiblock/ |
Latent-variable modelling: PCA, PLS, and multiblock methods |
batch/ |
Batch process data analysis |
monitoring/, process-control/ |
Process monitoring and control charts |
new-products/, image/, concepts/ |
Product development, image analysis, and general concept diagrams |
examples/, teaching/, mindmaps/ |
Worked examples, teaching aids, and chapter mind maps |
Other folders (separations/, reactors/, econ-prob-solve/, classification/, svm/,
and so on) support related teaching material and are not all used by the book.
File names are descriptive and hyphenated, for example
monitoring/CO2-phaseI-first-round.png. When a figure has several variants, the variant is
appended to the stem, for example doe/COST-contours.png and
doe/COST-contours-no-markers.png.
The table below lists the primary folder each chapter draws from, with one example figure from that chapter.
Primary folder: univariate/
Primary folder: visualization/
Primary folder: least-squares/
Primary folder: doe/
Primary folders: pca/, pls/, multiblock/
Primary folders: monitoring/, process-control/
Primary folders: image/, new-products/, concepts/
Data-driven figures are regenerated by running the script next to the image. For example:
cd doe
python COST-contours.py # writes COST-contours.pngThe book itself shows Plotly code to the reader, while the committed PNG is produced by the
matplotlib (or R, or MATLAB) script kept here. When the underlying analysis changes, update
the script and regenerate the image in the same commit, so the code and the picture stay in
step. Hand-drawn diagrams are edited in their .svg (or .pxm) source and re-exported.
Many of the generating scripts call the companion package
process-improve, and the package moves. Over
one release cycle five scripts here stopped running, on renamed keywords and changed return
types, and nothing noticed until a figure had to be regenerated: four of them drew every
figure on one page of the book.
Every .py file in this repository that reaches the package is therefore executed on each
pull request by
.github/workflows/check-scripts.yml. That means the
scripts that import it directly, and the ones that import a sibling module which does:
colour_case_study and omnibus_designs each stand behind a dozen figures, and a script
that leans on one of them breaks in exactly the same way. Which scripts are in scope is not
a list anyone maintains: a new script joins the set by importing the package, or a module
that does. Run the same check yourself with
uv run --no-project --with 'process-improve[all]' python tools/check_figure_scripts.py
python tools/check_figure_scripts.py --list # what would run
python tools/check_figure_scripts.py doe --jobs 1 # one directory, seriallyEach script runs in its own process, from its own directory, with savefig, show and
write_image disabled, so the check writes no image and leaves the committed PNGs alone; CI
fails if the working tree changes. A traceback fails a script, and so does a
DeprecationWarning, or any warning class the library defines, raised from a line of the
script itself: that is the library announcing a rename, and it is the warning that was
missed. A second, advisory job runs everything against the library's main branch, so a
change that will break these scripts is visible before it is released.
A script that should not run, that needs something CI's default environment cannot install, or that has grown too slow for every pull request, says so in a comment, with the reason:
# check-scripts: skip needs a licensed solver that CI cannot install
# check-scripts: slow a twelve-hour sweep; run it from the nightly schedule
# check-scripts: requires pyoptex -- the I-optimal colour design comes from pyoptexrequires is the interesting one. pyoptex pins versions of plotly and numba that cannot
share an environment with process-improve[all], which is why the colour case study's
scripts carry that marker: they skip in the main job and run in a third job that installs
process-improve[expt] alongside pyoptex, which is what the book tells its reader to
install for that chapter. Sixteen scripts are in that set.
These figures are part of Process Improvement using Data and are licensed, like the book, under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) licence.
You are free to copy, adapt, and redistribute the figures, including for courses you teach and for commercial use, provided that you:
- give attribution to the original author, Kevin Dunn, and
- share alike, licensing any adapted version under the same CC BY-SA 4.0 terms.
A small number of figures adapt third-party material (for example screenshots, or plots of publicly reported data such as stock prices). Where that is the case, the book credits the original source at the point of use; please carry that credit through if you reuse such a figure.
If you use these figures, please cite the book:
Dunn, K. G. (2010–2026). Process Improvement using Data (CC BY-SA 4.0). Zenodo. https://doi.org/10.5281/zenodo.20284934
- Book: https://learnche.org/pid
- Book source: https://github.com/kgdunn/pid-book
- Companion package: https://github.com/kgdunn/process-improve






