The net effect should be the following Basically, it is a zoom, except I don’t want to actually magnify a portion of a graph, but putting another more detailed one instead.
1 Answer
Note: If you need more inner nodes you could use two scopes.
Result
Code
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node[draw, dashed, ellipse, minimum width=40mm, minimum height=30mm, anchor=south west] (plot1) at (0,0) {plot 1};
\node[draw, minimum width=10mm, minimum height=7mm, x={(plot1.south east)}, y={(plot1.north west)}] (hlbox) at (.9,.7) {};
\node[draw, minimum width=30mm, minimum height=20mm, above right=of plot1, xshift=10mm] (plot2) {plot 2};
\draw[->] (plot2.south west) -- (hlbox.north east);
\end{tikzpicture}
\end{document}
-
Thanks. One last thing: when I add
\foreach \x in {1,...,300}{--++(0.03,{0.1*(floor(rand)*2.0+1.0)*sqrt(-ln(1-rand^2)/0.627)})}
in place of{plot 1}
pdflatex doesn't compile. Why?– ric.sanCommented Jan 23, 2023 at 10:12 -
1You should ask a new question for unrelated stuff.
{plot 1}
is the text content of the node. You can't put tikz commands in there. Commented Jan 23, 2023 at 10:38
pgfplots
and thespy library
would give you several hits. Another one: tex.stackexchange.com/a/116697/38080