0

I seem to be unable to modify the answer of this solution to align different plots in one tikzpicture. In my head, east should place the second axis to the right of the first axis. But they end up on top of each other. Here is the minimal working example:

enter image description here

\documentclass[11pt, a4paper]{book}

\usepackage{tikz, pgfplots}
\pgfplotsset{compat=1.16} 


\begin{document}

    \begin{tikzpicture}[scale=0.8]
        \begin{axis}[
            name=first,
            title=Weights after 30 steps,
            ]
        \end{axis}
        \begin{loglogaxis}[
            at=(first.right of east),
            anchor=outer east,
            title=Weights after 30 steps (loglog),
            ]
        \end{loglogaxis} 

    \end{tikzpicture}

\end{document}

And here is what I am generally trying to achieve in the end:enter image description here

But here the alignment does not work and that is how I found the suggestion, to place the axis in the same tikzpicture to avoid that. So other approaches to this problem would also be appreciated. (And if you have suggestions on how to remove that one scientific tic in the first plot, and how to move the labels such that they don't take as much space of the page, that would be great - but I should probably try to find a solution to that myself first)

Felix B.
  • 387
  • 4
    There exists the pgfplots library groupplots specifically for that. –  Apr 07 '19 at 14:24
  • I'd definitely look at groupplots, but think about what happens when you place node B at the east anchor of node A, while node B has the setting anchor=east. (And then try setting anchor=outer west for the loglogaxis.) – Torbjørn T. May 28 '19 at 19:35

0 Answers0