CTAN Comprehensive TeX Archive Network

Verzeichnis graphics/pgf/contrib/pgfplots-autonode

README.md

pgfplots-autonode 1.0.0

pgfplots-autonode is a format-generic Lua library for automatically placing labels on PGFPlots curves. It samples visible plot paths in final canvas coordinates, measures the actual node geometry, and solves all labels in an axis jointly. It supports linear and logarithmic axes, sloped labels, hard plot-boundary constraints, priorities, several deterministic assignment algorithms, and visual or textual diagnostics.

The package is independent of luacoolprop: it neither loads nor calls LuaCoolProp or CoolProp. It requires Lua and PGFPlots 1.18 or later, but it does not require shell escape.

Loading

With Lua, either load the convenience package

\usepackage{pgfplots-autonode}
\pgfplotsset{compat=1.18}

or load it as an ordinary PGFPlots library:

\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepgfplotslibrary{autonode}

For plain Lua use \input pgfplots.tex; for Cont MkIV use \usemodule[t][pgfplots]. In both cases, follow the frontend with \usepgfplotslibrary{autonode}.

Minimal example

\begin{tikzpicture}
\begin{axis}[
  auto node placement,
  auto node algorithm=repair
]
  \addplot[blue,domain=0:4] {x}
    \pgfplotsautonode[preferred pos=.65,sloped=true]{$y=x$};
  \addplot[red,domain=0:4] {4-x}
    \pgfplotsautonode[preferred pos=.35,sloped=true]{$y=4-x$};
\end{axis}
\end{tikzpicture}

auto node placement activates the per-axis lifecycle. Attach \pgfplotsautonode[<options>]{<text>} to each labelled \addplot before its final semicolon. See pgfplots-autonode-manual.pdf for the tutorial, complete key reference, algorithms, geometry model, diagnostics, and troubleshooting. The manual also includes a dense pressure–enthalpy chart generated by LuaCoolProp as a real-world case study of collision-aware isoline labels.

!WARNING
This package has been vibe-coded with ChatGPT. Substantial parts of its
design, code, documentation, and tests were generated or revised with AI
assistance. Inspect the source and validate its output for your application.

Author and Current Maintainer: Christophe Jorssen <christophe.jorssen@gmail.com>. Version 1.0.0 is dated 2026-09-20. The work is maintained and distributed under the Project Public License 1.3c or later. Development takes place in the pgfplots-autonode repository.

Reproducible builds and tests

Build the autonomous manual and examples with:

./scripts/build-autonode.sh

Run the Lua, Lua, plain Lua, Cont, and installed-tree independence tests with:

./scripts/test-autonode.sh

Create the browsing and TDS release archives with:

./scripts/package-autonode-release.sh

The test installs only the pgfplots-autonode TDS tree and rejects any runtime reference to luacoolprop.

Release changes are recorded in CHANGELOG.md.

Copyright (C) 2026 Christophe Jorssen.

Herunterladen des vollständigen Inhalts dieses Pakets in einem Zip-Archiv (623.6k).

PGFplots-autonode – Collision-aware automatic labels for PGFPlots curves

pgfplots-autonode is a format-generic Lua library for automatic collision-aware labels on PGFPlots curves. It measures actual node geometry, samples visible paths in canvas coordinates, and offers deterministic bounded assignment algorithms, plot-boundary constraints, priorities, and diagnostics for Lua, plain Lua, and Cont.

PaketPGFplots-autonode
Repository
Version1.0.0
LizenzenThe Project Public License 1.3c
Copyright2026 Christophe Jorssen
BetreuerChristophe Jorssen
ThemenGrafik-Funktionen-Plot
Lua
PGF/
Siehe auchluacoolprop
...
Gästebuch Seiten-Struktur Impressum Autor kontaktieren