- I really tried to solve this question on my own: I must have missed the obvious answer.
- One can use
\pgfplotsset{compat=x.y}to set used version ofpgfplots. - I thought that the version that is stated on CTAN or the manual cover page is the version that I can use within
\pgfplotsset{compat=x.y}. - But apparently, I am mistaken since the current version on CTAN is labeled
1.18.1but I can use\pgfplotsset{compat=1.9}in my document. - Question: Where does a naive user (meaning: no solution that requires looking at a log file) find out what is the newest version of
pgfplotswithout using\pgfplotsset{compat=newest}(see here).
Update: I was stupid and confused 1.18 with 1.1.8! Thanks to user CarLaTeX for the help!

1.8in order to use a specific feature. This is what made me wonder. – Dr. Manuel Kuehner Mar 10 '22 at 22:11\pgfplotsset{compat=1.8}, then. – CarLaTeX Mar 10 '22 at 22:14newestoption, see https://tex.stackexchange.com/questions/139690/. – Dr. Manuel Kuehner Mar 10 '22 at 22:16\pgfplotsset{compat=1.18}, I have updated my TeX Live this morning. – CarLaTeX Mar 10 '22 at 22:181.8or1.9? Isn't1.8 > 1.18? The manual also mentioned1.3etc. – Dr. Manuel Kuehner Mar 10 '22 at 22:201.18with1.1.8! – Dr. Manuel Kuehner Mar 10 '22 at 22:211.18to1.8in order to get a simple example running and that is why I assumed that1.8must be newer. – Dr. Manuel Kuehner Mar 10 '22 at 22:23tikzpictureis actually not necessary in your example, the warning comes anyway. In addition,\documentclass{article} \usepackage{pgfplots} \begin{document} \pgfplotsversion \end{document}can be used to print the version number in the PDF. – Torbjørn T. Mar 10 '22 at 22:23