pgf-tikz / pgfplots

pgfplots - A TeX package to draw normal and/or logarithmic plots directly in TeX in two and three dimensions with a user-friendly interface and pgfplotstable - a TeX package to round and format numerical tables. Examples in manuals and/or on web site.
http://pgfplots.sourceforge.net/
187 stars 33 forks source link

Missing character warnings when setting samples to certain values #456

Closed leingang closed 1 year ago

leingang commented 1 year ago

Here is a MWE:

\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
    \begin{axis}
        \addplot[samples=51] {x^2};
    \end{axis}
\end{tikzpicture}
\end{document}

The document produces the expected output, but there are some warnings in the log file:

Missing character: There is no . in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no 1 in font nullfont!
Missing character: There is no p in font nullfont!
Missing character: There is no t in font nullfont!

I know that these warnings come up when non-drawing tokens are inside the tikzpicture environment. The tokens .01pt looks like some length that's being read as text instead of as a length. Curiously, the messages are not present if I set samples=51 instead, which makes me wonder if it's happening around x=0.

hmenke commented 1 year ago

Backtrace

! Missing character: There is no . ("2E) in font nullfont.
<recently read> .

\pgfplotsforeachtodomain@@ ...t \ifnum \pgf@xa >0.
                                                  01pt \def \pgfplotsretval ...
<argument> ...3000000000,...,5.0000000000\relax {}
                                                  \else \ifpgfplotsforeachun...

\pgfplots@for@reset@break ...gffor@continuetrue #1
                                                  \relax \pgffor@continuetru...

\pgfplotsforeachtodomain ...{}}\pgfplots@loc@TMPa 
                                                  \xdef \pgfplots@glob@TMPa ...

\pgfplots@validate@plot@domain@arguments ...esat }
                                                  \ifx \pgfplotsretval \pgfu...

\pgfplots@addplotimpl@expression@set@options ...s}
                                                  \pgfplots@plot@expression@...

\pgfplots@addplotimpl@expression@curly@ ...#1}{#2}
                                                  \ifpgfplots@curplot@threed...
l.12         \addplot[samples=50] {x^2};
hmenke commented 1 year ago

Already fixed in 9f4e2b14af77fd196d769e98dbc622d68dd8df88 (https://github.com/pgf-tikz/pgfplots/pull/451)

leingang commented 1 year ago

Thank you! I'll look forward to the next release.