Assuming in a presentation first a large and relatively complicated tikzpicture is shown. After this overview, the focus should be set to two small parts of the graph and next to it, there should be a ennumeration, describing the relevance of these two subprocesses. I've tried the following using the spy
tikzlibrary:
\usepackage{tikz}
\usetikzlibrary{spy}
\begin{document}
\begin{tikzpicture}[spy using outlines={rectangle, magnification=5, size=2cm, connect spies}]
\def\corxb{0}
\def\coryb{0}
%firstly defining the start variables so the object can be positioned relatively to another object.
%fill the tank with water
\fill[top color=blue!90!,bottom color=blue!2,middle color=blue!30,shading=axis,opacity=0.15] (\corxb,\coryb+4) circle (2cm and 0.5cm);
\fill[left color=gray!50!blue,right color=blue!50!black,middle color=gray!50,shading=axis,opacity=0.15] (\corxb+2,\coryb) -- (\corxb+2,\coryb+4) arc (360:180:2cm and 0.5cm) -- (\corxb-2,\coryb) arc (180:360:2cm and 0.5cm);
%draw densely dashed lines for the "hidden" lines
\draw[] (\corxb-2,\coryb+0) arc (180:0:2cm and 0.5cm);
\draw[] (\corxb-2,\coryb+4) arc (180:0:2cm and 0.5cm);
%draw the outline
\draw (\corxb-2,\coryb+4) -- (\corxb-2,\coryb) arc (180:360:2cm and 0.5cm) -- (\corxb+2,\coryb+4) ++ (\corxb-4,\coryb);
\draw[] (\corxb-2,\coryb+4) arc (180:360:2cm and 0.5cm);
\spy [red,dashed, magnification=1.8] on (-1.5,0) in node at (-2,-2);
\spy [red,dashed, magnification=1.8] on (1.5,0) in node at (2,-2);
\end{tikzpicture}
\end{document}
This is fine as it is, but it doesn't allow to add bullet points to describe the graph. Therefore, I want to display only the magnified part, while having the enumeration as described above (the enumeration is not directly related to this question, however, I thought I'll leave it in to describe my intentions):
Additional clarification: i only need the magnified part, there is no need for the rest of the graph to be displayed.
A possiblity seems to be to just clip the picture, but i think it's quite impractical to do especially if you're working with large graph that have different elements and you don't know exactly where a certain node is located exactly e.g. in the case of (nodeX.south)
.
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{spy}
\begin{document}
\begin{tikzpicture}[spy using outlines={rectangle, magnification=5, size=2cm, connect spies}]
\path[clip] (-2.25,-1) rectangle (0,0.75);
\draw[red, thick, dashed] (-2.25,-1) rectangle (0,0.75);
%
\def\corxb{0}
\def\coryb{0}
%firstly defining the start variables so the object can be positioned relatively to another object.
%fill the tank with water
\fill[top color=blue!90!,bottom color=blue!2,middle color=blue!30,shading=axis,opacity=0.15] (\corxb,\coryb+4) circle (2cm and 0.5cm);
\fill[left color=gray!50!blue,right color=blue!50!black,middle color=gray!50,shading=axis,opacity=0.15] (\corxb+2,\coryb) -- (\corxb+2,\coryb+4) arc (360:180:2cm and 0.5cm) -- (\corxb-2,\coryb) arc (180:360:2cm and 0.5cm);
%draw densely dashed lines for the "hidden" lines
\draw[] (\corxb-2,\coryb+0) arc (180:0:2cm and 0.5cm);
\draw[] (\corxb-2,\coryb+4) arc (180:0:2cm and 0.5cm);
%draw the outline
\draw (\corxb-2,\coryb+4) -- (\corxb-2,\coryb) arc (180:360:2cm and 0.5cm) -- (\corxb+2,\coryb+4) ++ (\corxb-4,\coryb);
\draw[] (\corxb-2,\coryb+4) arc (180:360:2cm and 0.5cm);
%\spy [red,dashed, magnification=1.8] on (-1.5,0) in node at (-2,-2);
\end{tikzpicture}
\end{document}