I am trying to get a plot with a left and right y axis, to plot 2 different plots in one.
I was able to do this with stack, but when both graphs go down, they seem to overlap, so you cannot see one of them... Therefore I wanted to change them into nice bar charts perhaps. Any idea on how I do this? When I use ybar, the stack doesn't work anymore...
Another thing, I am also trying to remove the subdivisions from the axis, so it only says 0 and 1 on the x axis.
Code: Select all
\begin{figure}
\caption{Means plot for NH2 (CP)}
\begin{tikzpicture}[scale=1]
\begin{axis}[stack plots=y,
axis x line=bottom,
axis y line=left,
axis z line=right,
xlabel=$N_2$,
ylabel=Score]
\addplot[color=black, mark=*, mark options={fill=white}] coordinates {
(0 , 1.7797252921)
(1 , 0.8648765802)
};
\end{axis}
\begin{axis}[stack plots=y,
axis x line=bottom,
axis y line=right,
axis z line=right,
xlabel=$N_2$,
ylabel=Time]
\addplot[color=black, dotted, mark=*, mark options={fill=white}] coordinates {
(0.0 , 94.577421875)
(1.0 , 77.7847366898)
};
\end{axis}
\end{tikzpicture}
\label{fig:mnh1}
\end{figure}