From 9ea56c35fefaf066a39d01025706b03e9e60e7bb Mon Sep 17 00:00:00 2001
From: Martina Maggio <maggio.martina@gmail.com>
Date: Wed, 17 Oct 2018 11:29:28 +0200
Subject: [PATCH] magnifying zoom

---
 paper/sections/06-results.tex | 37 +++++++++++++++++++++++++++++++++--
 1 file changed, 35 insertions(+), 2 deletions(-)

diff --git a/paper/sections/06-results.tex b/paper/sections/06-results.tex
index 285f087..68c099f 100644
--- a/paper/sections/06-results.tex
+++ b/paper/sections/06-results.tex
@@ -465,8 +465,8 @@ signal.
 \end{minipage}
 \hfill
 \begin{minipage}{0.95\columnwidth}
-\vspace{1.25cm}
-\begin{tikzpicture}
+\vspace{1.1cm}
+\begin{tikzpicture}[spy using outlines={rectangle, width=7.5cm, height=1cm, magnification=2.5, connect spies}]
 \begin{axis}[%
  height = 0.6\textwidth,
  grid style = {black!30, dashed},
@@ -476,6 +476,7 @@ signal.
  scaled y ticks = false,
  xlabel = {Energy [mJ]},
  ylabel = {Error},
+ ymax = 400,
 ]
 \pgfkeys{/pgf/number format/.cd,1000 sep={}}
 \addplot[thick, only marks, mark=*, blue]
@@ -496,7 +497,39 @@ signal.
 \addplot[thick, only marks, mark=*, orange]
  table[x index = {0}, y index = {1}, col sep=comma]
  {data/exp_sc6.csv};
+\coordinate (spypoint) at (axis cs:40000,3);
 \end{axis}
+\node[pin={[pin distance=0.9cm]65:{%
+        \begin{tikzpicture}[baseline, trim axis left, trim axis right]
+          \vspace{-1cm}
+            \begin{axis}[height=3cm, width=5cm,
+                    every axis plot post/.append style={thick},
+                    xtick = {}, xticklabels = {},
+                    ymin=0,ymax=10,
+                    scaled x ticks = false,
+                    grid style = {black!10, dotted},
+                    grid = major,
+                ]
+\addplot[thick, only marks, mark=*, blue]
+ table[x index = {0}, y index = {1}, col sep=comma]
+ {data/exp_sc1.csv};
+\addplot[thick, only marks, mark=*, red]
+ table[x index = {0}, y index = {1}, col sep=comma]
+ {data/exp_sc2.csv};
+\addplot[thick, only marks, mark=*, green]
+ table[x index = {0}, y index = {1}, col sep=comma]
+ {data/exp_sc3.csv};
+\addplot[thick, only marks, mark=*, purple]
+ table[x index = {0}, y index = {1}, col sep=comma]
+ {data/exp_sc4.csv};
+\addplot[thick, only marks, mark=*, yellow]
+ table[x index = {0}, y index = {1}, col sep=comma]
+ {data/exp_sc5.csv};
+\addplot[thick, only marks, mark=*, orange]
+ table[x index = {0}, y index = {1}, col sep=comma]
+ {data/exp_sc6.csv};
+            \end{axis}\end{tikzpicture}%
+    }},draw, rectangle, minimum width=3.3cm] at (spypoint) {};
 \end{tikzpicture}
 \caption{Trade-Off between Energy and Error when driving
 (with signal loss).}
-- 
GitLab