Skip to content

Latest commit

 

History

828 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Figures for Process Improvement using Data

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.

What is in here

Roughly 2000 rendered images (PNG, JPG, and SVG), together with the code and design files that generate them:

  • Rendered output: .png, .jpg, and .svg files. 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 example doe/COST-contours.py produces doe/COST-contours.png.
  • Editable artwork: .svg vector sources for hand-drawn diagrams, .pxm (Pixelmator) raster sources, and .xmind files for the mind maps.
  • Small supporting data: a few .csv and .dat files used by the scripts.

How the repository is organised

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.

Naming

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.

Where each book chapter's figures live

The table below lists the primary folder each chapter draws from, with one example figure from that chapter.

Univariate review

Primary folder: univariate/

BOD comparison plot

Data visualization

Primary folder: visualization/

AAPL stock prices

Least squares modelling

Primary folder: least-squares/

ANOVA shown graphically

Design and analysis of experiments

Primary folder: doe/

COST (one factor at a time) contour search

Latent variable modelling

Primary folders: pca/, pls/, multiblock/

NIPALS iterations for PCA

Process monitoring

Primary folders: monitoring/, process-control/

Phase I control chart, first round

Product development using latent variables

Primary folders: image/, new-products/, concepts/

Unfolding an image into a data table

Regenerating a figure

Data-driven figures are regenerated by running the script next to the image. For example:

cd doe
python COST-contours.py         # writes COST-contours.png

The 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.

Scripts that use process-improve are run in CI

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, serially

Each 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 pyoptex

requires 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.

Usage rights

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.

Citation

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

About

Figures for my pid-book repository, course slides, and public resources where I use illustrations.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages