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 37 38 39 40 41 42
| \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} \usetikzlibrary{spy} % \pgfplotsset{width=7cm,compat=1.14}
\begin{document} \begin{tikzpicture}[pin distance=1.5cm] \begin{axis}[no markers,grid=major, every axis plot post/.append style={thick}] \addplot coordinates {(0, 0) (0, 0.9) (1, 0.9) (2, 1) (3, 0.9) (80, 0)}; \addplot+ [line join=round] coordinates {(0, 0) (0, 0.9) (2, 0.9) (3, 1) (4, 0.9) (80, 0)}; \addplot+ [line join=bevel] coordinates {(0, 0) (0, 0.9) (3, 0.9) (4, 1) (5, 0.9) (80, 0)}; \addplot+ [miter limit=5] coordinates {(0, 0) (0, 0.9) (4, 0.9) (5, 1) (6, 0.9) (80, 0)}; \coordinate (spy_point) at (axis cs:0,1); \end{axis} %plot the magnified figure using a node \node[pin=-5:{% \begin{tikzpicture} \begin{axis}[no markers, thick,scale=0.8, tiny, xlabel={x}, ylabel={y}, xmin=0,xmax=8, ymin=0.85,ymax=1.05, enlargelimits, ] \addplot coordinates {(0, 0) (0, 0.9) (1, 0.9) (2, 1) (3, 0.9) (80, 0)}; \addplot+ [line join=round] coordinates {(0, 0) (0, 0.9) (2, 0.9) (3, 1) (4, 0.9) (80, 0)}; \addplot+ [line join=bevel] coordinates {(0, 0) (0, 0.9) (3, 0.9) (4, 1) (5, 0.9) (80, 0)}; \addplot+ [miter limit=5] coordinates {(0, 0) (0, 0.9) (4, 0.9) (5, 1) (6, 0.9) (80, 0)};
\end{axis} \end{tikzpicture}% }] at (spy_point) {}; \end{tikzpicture}
|