Tikz, 범위 확장 및 공유 노드

Tikz, 범위 확장 및 공유 노드

주요 그림에 작은 하위 그림을 포함하기 위해 스케일링된 범위를 사용하려고 했습니다. 그런데 scaled 범위 밖의 노드를 참조하려고 하면 가리키는 노드가 이전 non-scaled 노드의 위치에 있습니다... 그림은 다음과 같습니다.

여기에 이미지 설명을 입력하세요

그것을 피하는 방법을 알고 있습니까?

감사합니다 !

추신: 여기 제 WME가 있습니다.

\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}     
\usepackage{float}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,arrows}
\usetikzlibrary{mindmap,backgrounds,positioning}
\usetikzlibrary{automata,positioning,fit,backgrounds}
\usetikzlibrary{positioning,arrows,matrix,calc}

\begin{document}

\begin{figure}[H]
  \centering
  \begin{tikzpicture}
    \begin{scope}[transform canvas={scale=1},overlay]
      \node[fill=green]   (a) {A};
      \node[fill=green,right=of a] (b) {B};
    \end{scope}
    \node[draw,below=5mm of b] (c) {C};
    \draw[<->] (c) -- (b);
  \end{tikzpicture}%
  \hspace{3cm}%
  \begin{tikzpicture}
    \begin{scope}[transform canvas={scale=0.2},overlay]
      \node[fill=green]   (a) {A};
      \node[fill=green,right=of a] (b) {B};
    \end{scope}
    \node[draw,below=5mm of b] (c) {C};
    \draw[<->] (c) -- (b);
  \end{tikzpicture}%
\end{figure}

\end{document}

답변1

아마도 당신은 이것을 원합니까?

스케일링 및 언스케일링

\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}
\usepackage{tikz}
\usetikzlibrary{positioning,babel}

\begin{document}

\begin{figure}
  \centering
  \begin{tikzpicture}
    \node[fill=green]   (a) {A};
    \node[fill=green,right=of a] (b) {B};
    \node[draw,below=5mm of b] (c) {C};
    \draw[<->] (c) -- (b);
  \end{tikzpicture}
  \hspace{3cm}
  \begin{tikzpicture}
    \begin{scope}[scale=0.2, every node/.append style={transform shape}]
      \node [fill=green]   (a) {A};
      \node [fill=green,right=of a] (b) {B};
    \end{scope}
    \node [draw,below=5mm of b] (c) {C};
    \draw [<->] (c) -- (b);
  \end{tikzpicture}
\end{figure}

\end{document}

관련 정보