2

Here is a MWE:

\documentclass[]{beamer}
\usepackage{fontspec}
\usetheme{metropolis}


\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}

\begin{document}
\begin{frame}[t]
 \begin{tikzpicture}
 \begin{axis}[xmin=0,
    xmax=1,
    ymin=0,
    ymax=1]
 \draw (0,0)--(.2,0.1);
 \end{axis}
 \end{tikzpicture}  
\end{frame}
\end{document}

There seems to be a problem with the metropolis theme. The above produces no line just a blank box. If you comment out the metropolis theme, the result displays fine. Any idea why?

(for the record: Xelatex is used to combilde both).

There seem to be issues with the coordinates, because \node at (0.5,0.5) {node}; produces a node at the origin.

But how come this only shows up once the metropolis theme s activated?

Am I missing something important?

4

Looking over the code, the theme is forcing compat=1.9 when pgfplots is loaded. That's an old setting, so you need to disable it with

\AtBeginDocument{\pgfplotsset{compat=newest}}

which restores normal service.

2
  • Thanks. That was a quick fix. A bit embarassing that I didn't notice that.... – johaschn May 4 at 14:49
  • @johaschn It's not really that obvious – Joseph Wright May 4 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.