TikZ/PGFplots etx

March 2, 2015 — March 25, 2024

communicating
computers are awful
dataviz
faster pussycat
LaTeX
photon choreography
plain text
typography
UI
workflow
Figure 1

The classic type-your-diagram-in-then-work-out-what-went-wrong option for plotting. If I am constructing a well-understood type of diagram (e.g. a PGM) then this is good. If we are doing something unusual, it can become tedious. However, ChatGPT is very good at writing TikZ, and that is what I usually use.

The main strength of TikZ compared to other text-to-diagram things is that it has flexible ways of declaring layouts. Alternative tools prefer automatic layouts, which sounds like a good idea, but in empirically has never actually been what I want in the end, when I am trying to draw a diagram that uses spatial information to convey things.

The original flavour, pstricks/TikZ, is based on postscript and has compatibility problems with modern toolchains Modern projects seem to prefer the more compatible (less powerful ?) PGF/TikZ.

latexdraw is a Java pstricks GUI. Might be good, but I couldn’t install it.

TikZiT, looks like a reasonably good alternative GUI (HT Luis Riera Garcia for showing me this)

a super simple GUI editor for graphs and string diagrams. Its native file format is a subset of PGF/TikZ, which means TikZiT files can be included directly in papers typeset using LaTeX.

Agustinus Kristiadi, in The Last Mile of Creating Publication-Ready Plots introduces texworld/tikZplotlib, a matplotlib backend.

The overleaf tutorial, LaTeX Graphics using TikZ, is probably the best one.

I am currently trying to render TikZ in quarto using an extension that I wrote: danmackinlay/quarto\_tikz and also pandoc-ext/diagram which has more features but is a bit broken on recent quarto versions, and has more opaque error messages. I maintain a bug-fixed version of pandoc-ext/diagram called danmackinlay/pandoc_diagram,

1 Incoming

2 References

Kottwitz, Stefan. 2023. LaTeX Graphics with TikZ: A practitioner’s guide to drawing 2D and 3D images, diagrams, charts, and plots. Packt Publishing.