I am trying to create a plot with two separate y-axes. The right y-axis is units "*10^5". However, the multiplication caption is not positioned correctly. I use the following code:
Code: Select all
\begin{tikzpicture}
\begin{axis}[
axis y line* = left,
xlabel = grid size $l$,
ylabel = \textcolor{blue}{\footnotesize$\blacksquare$}
indices per $\mathcal{T}$,
ymode = log,
log origin=infty
]
\addplot[color=blue,mark=x] coordinates {
(15000,317.631)
(20000,182.318)
(40000,49.3089)
(80000,14.4933)
(160000,5.02436)
(320000,2.37795)
(500000,1.81145)
(640000,1.62701)
(1280000,1.29392)
(2560000,1.18447)
};
\end{axis}
\begin{axis}[
hide x axis,
ylabel near ticks,
axis y line*=right,
ylabel={\textcolor{red}{\footnotesize$\blacksquare$} number of $\mathcal{T}_{pot}$}
]
\addplot[color=red,mark=x] coordinates {
(15000,40819)
(20000,41179)
(40000,41179)
(80000,42720)
(160000,44312)
(320000,44866)
(640000,98610)
(1280000,168980)
(2560000,184202)
};
\draw[black,dashed] (axis cs:500000,0) -- (axis cs:500000,200000);
\draw (axis cs:500000,200000) node[below right] {$l_r$};
\end{axis}
\end{tikzpicture}
Any help is highly appreciated!