1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| \documentclass[10pt, final, journal, twocolumn, oneside]{IEEEtran}
%!TEX program = xelatex % !TEX encoding = UTF-8 (utf8) %!TEX spellcheck %\def\pgfsysdriver{pgfsys-dvipdfmx.def} \usepackage{tikz}
\usepackage{pgfplots} \pgfplotsset{width=7cm,compat=1.14}\begin{document} \begin{tikzpicture} \pgfplotsset{set layers} \begin{axis}[scale only axis, grid=major, axis y line*=left, y axis line style={blue}, y tick label style={blue}, xlabel=x, ylabel=\ref{y1}\color{blue}y1,] \addplot [blue,mark=square] table[x index=0, y index=1,red] {y1.dat};\label{y1} \end{axis}
\begin{axis}[scale only axis, grid=major, axis y line*=right, axis x line=none, y axis line style={red}, y tick label style={red}, ylabel=\ref{y2}\color{red}y2, ] \addplot [red,mark=asterisk] table[x index=0, y index=1] {y2.dat};\label{y2} \end{axis}
\end{tikzpicture}
\end{document
|