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:
\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:
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)

groupplotsspecifically for that. – Apr 07 '19 at 14:24groupplots, but think about what happens when you place node B at theeastanchor of node A, while node B has the settinganchor=east. (And then try settinganchor=outer westfor theloglogaxis.) – Torbjørn T. May 28 '19 at 19:35