0

I have a docker image with texlive installed (via apt not tlmgr). I have a pgfplot in my project which needs a newer pgfplot version. I'm searching for ways to update my pgplots because I can't update it with tlmgr because of base install via apt.

Initial error message if I try to compile with texlive 2014:

! Package pgfkeys Error: Choice '1.16' unknown in choice key '/pgfplots/compat/
anchors'. I am going to ignore this key.

See the pgfkeys package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.7 \pgfplotsset{compat=1.16}
                             
? 
! Emergency stop.
 ...                                              
                                                  
l.7 \pgfplotsset{compat=1.16}

I downloaded the pgfplots.tds and did the following steps like the manual said:

docker cp pgfplots.tds docker_container_name:/root/texmf/pgfplots
export TEXINPUTS=/root/texmf/pgfplots/tex//:
export TEXDOCS=/root/texmf/pgfplots/doc//:
export LUAINPUTS=/root/texmf/pgfplots//:
texhash

Of course the export and texhash were done inside the container and not on the host system.

After this, the error message is gone, but I have a new issue:

package pgfplots notification 'compat/show suggested version=true': you might b
enefit from \pgfplotsset{compat=1.18} (current compat level: 1.16).

! Illegal parameter number in definition of \pgfmaththisrow@.
<to be read again> 

I searched online and got the response that this is because of a broken pgfplots installation. In many articles the fix was just to install the texlive new. But I can't do that.

The issue should also not be in the tex code itself. If I install texlive on my host system, which is the most recent Ubuntu distro, the tex compiles just fine.

Can somebody help me in fixing this or lead me to a better way of upgrading pgfplots?

HeXXeN
  • 1
  • 1
  • Where did you download pgfplots.tds from and which version of pgfplots does this correspond to? Newer versions might not be compatible with an old kernel and/or tikz version from texlive 2014 – samcarter_is_at_topanswers.xyz Oct 27 '21 at 09:00
  • It's version 1.18.1 downloaded from https://ctan.org/pkg/pgfplots?lang=en – HeXXeN Oct 27 '21 at 09:05
  • Wow, that's brave! Instead of trying to install a brand new pgfplots with an eight year old texlive, try with the minimal version you seem to need, e.g. 1.16 https://github.com/pgf-tikz/pgfplots/releases/tag/1.16 – samcarter_is_at_topanswers.xyz Oct 27 '21 at 09:15
  • Thanks for the tip... tried it with 1.16. Still no luck, same error message regarding \pgfmaththisrow. – HeXXeN Oct 27 '21 at 09:19

1 Answers1

0

Resolution:

The pgfplots package 1.18.1 and also 1.16 were to recent. It had conflicts with the pgf package. I tried to go further back and landed on \pgfplotsset{1.14} and version 1.14 of pgfplots.tds.

This works fine now. I was probably pretty lucky that my plot looks and functions the same with this version as in 1.18.

This approach probably won't work for you if your more bound to version 1.18.

HeXXeN
  • 1
  • 1