XeLaTex with pgfplots displays wrong color?
Workaround. Use
\pgfplotsset{axis line style={color=black}}
instead.
I asked on the dvipdfmx list and Shunsaku Hirata confirmed my suspicion that it is a dvipdfmx failure. A similar problem can be shown with this smaller example:
\documentclass{article}
\begin{document}
\special{pdf:bcolor [0]}
\special{pdf:code q 1 0 0 rg 1 0 0 RG}
text in red
\special{color push gray 0} %switch back to black
Text in black.
\special{color pop}
\special{pdf:code Q}
\special{pdf:ecolor}
\end{document}
"Text in black" should be black but is red. The source of the problem is that dvipdfmx doesn't know that the color has been changed to red with the pdf:code
special - it only keeps track of the color specials - and so assumes that the color has not changed and that it can ignore the color push gray 0
.
The problem will be resolved in a future version.
https://tug.org/pipermail/dvipdfmx/2019-August/000030.html