Session E2: Diagrams, Plots, and Code

Overview

This session covers everything in a STEM document that is not prose or equations: drawing diagrams directly in LaTeX with TikZ, plotting functions and data files with pgfplots, commutative diagrams with tikz-cd, and typesetting real source code and pseudocode. The point is reproducibility: plots that read your data file and code listings that read your source file can never go stale.

Lecturers

TBD

Session Information

Core Concepts

  • TikZ fundamentals: coordinates, paths, nodes, and arrows
  • Relative positioning and reusable node styles (flowcharts, automata, block diagrams)
  • Plotting functions and .csv data files with pgfplots
  • Axis labels with units (siunitx inside pgfplots)
  • Commutative diagrams with tikz-cd
  • Source code with the listings package; when to use minted instead
  • Pseudocode with algorithm2e
  • Diagrams and plots as proper floats: captioned, labelled, referenced

Slides

Session E2 Slides: Download PDF

References

Exercises & Extra Steps


Questions? Reach out on the course’s WhatsApp!