I am going through the PGFPLOTS manual and copied the first code example from Section 5.13 Ternary Diagrams which I have placed into a document on overleaf.com. The code is as follows:
\documentclass{article}
\usepackage[utf8]{inputenc}
% PGF Plots
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\usepgfplotslibrary{ternary}
\begin{document}
\centering
\begin{tikzpicture}
\begin{ternaryaxis}
\addplot3 coordinates {
(0.81, 0.19, 0.00)
(0.76, 0.17, 0.07)
(0.66, 0.16, 0.16)
(0.76, 0.07, 0.17)
(0.81, 0.00, 0.19)
};
\addplot3 coordinates {
(0.85, 0.15, 0.00)
(0.82, 0.13, 0.05)
(0.73, 0.14, 0.13)
(0.82, 0.06, 0.13)
(0.84, 0.00, 0.16)
};
\legend{$10$\textdegree, $20$\textdegree}
\end{ternaryaxis}
\end{tikzpicture}
\end{document}
I get two errors, which do not stop compilation of the document but are flagged up as Undefined control sequence at \end{ternaryaxis}. The logs output is as follows for each error:
\pgfplots@already@computed@legend@node ...tdegree
};\\\pgfplots@show@small@l...
l.29 \end{ternaryaxis}
It is a manageable issue at this point but I'd like to know a solution if possible before I get too far into my dissertation and it potentially becomes a problem.
Thanks
\usepackage{textcomp}
to the preamble solves your issue.\textdegree
. (Yes, it might be better if the manual mentioned that.)