我有两张 TikZ 图片,我想将它们并排放置,以便每张图片都有自己的标题。我尝试使用 \hfil,但它在它们之间产生了很大的间隙。此外,我的论文设置为 4 厘米(左边距),因此虽然我使用了 \resizebox,但将它们设置为合适的大小还是有点困难。有人能帮我解决这个问题吗?
\documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{xdxdff}{rgb}{0.49019607843137253,0.49019607843137253,1.}
\definecolor{ududff}{rgb}{0.30196078431372547,0.30196078431372547,1.}
\definecolor{zzttqq}{rgb}{0.6,0.2,0.}\definecolor{zzttqq}{rgb}{0.6,0.2,0.}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\clip(-4.3,-7.36) rectangle (20.1,6.3);
\fill[line width=0.8pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (0.,5.) -- (1.24,5.) -- (1.2201234230270745,0.19579267785163076) -- (0.,0.2) -- cycle;
\fill[line width=0.8pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (4.64,5.) -- (5.8,5.) -- (5.8,0.18) -- (4.64015172233386,0.1839994768195382) -- cycle;
\draw [line width=0.8pt] (0.,5.)-- (5.8,5.);
\draw [line width=0.8pt] (0.,4.)-- (5.8,4.);
\draw [line width=0.8pt] (0.,0.2)-- (5.8,0.18);
\draw (0.2,0.3) node[anchor=north west] {$\footnotesize L_{f}$};
\draw (4.7,0.26) node[anchor=north west] {$\footnotesize L_{a}=L_{e}$};
\draw [line width=0.8pt] (4.64,5.)-- (4.64015172233386,0.1839994768195382);
\draw [line width=0.8pt] (5.8,1.18)-- (0.,1.16);
\draw [line width=0.8pt] (1.24,5.)-- (1.2201234230270745,0.19579267785163076);
\draw [line width=0.8pt] (0.,5.)-- (0.,0.2);
\draw [line width=0.8pt] (5.8,5.)-- (5.8,0.18);
\draw (0.62,4.76) node[anchor=north west] {$\footnotesize h$};
\draw (4.7,4.76) node[anchor=north west] {$\footnotesize ha$};
\draw (2.4,5.16) node[anchor=north west] {$\footnotesize \psi_{a}\vert_{_{_{H_{f}}}} $};
\draw [line width=1.2pt] (1.04,4.3)-- (4.42,4.28);
\draw [line width=1.2pt] (5.5,4.2)-- (5.5,1.38);
\draw (4.68,3.34) node[anchor=north west] {$\footnotesize \phi_{a^{*}}\vert_{_{_{H_{a}}}} $};
\draw (2.3,2.84) node[anchor=north west] {$\footnotesize \Psi $};
\draw (4.74,1.28) node[anchor=north west] {$\footnotesize a^{*}ha$};
\draw (0.06,5.18) node[anchor=north west] {$\footnotesize H_{f}$};
\draw (5.32,5.18) node[anchor=north west] {$\footnotesize H_{a}$};
\draw (5.26,0.86) node[anchor=north west] {$\footnotesize H_{e}$};
\draw (-0.72,1.08) node[anchor=north west] {$\footnotesize R_{e}$};
\draw [line width=0.8pt,dash pattern=on 5pt off 5pt] (1.42,3.78)-- (4.42,1.36);
\begin{scriptsize}
\draw [fill=black,shift={(4.42,4.28)},rotate=270] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=black,shift={(5.5,1.38)},rotate=180] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=ududff] (1.04,4.3) circle (1.0pt);
\draw [fill=ududff] (5.5,4.2) circle (1.0pt);
\draw [fill=black,shift={(4.42,1.36)}] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=xdxdff] (-5.8,5.) circle (2.5pt);
\draw[color=xdxdff] (-4.18,6.47) node {$G'$};
\end{scriptsize}
\end{tikzpicture}
\hfil
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\clip(-4.3,-7.36) rectangle (20.1,6.3);
\fill[line width=2.pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (0.,5.) -- (5.8,5.) -- (5.8,4.) -- (0.,4.) -- cycle;
\fill[line width=2.pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (0.,1.16) -- (5.8,1.18) -- (5.8,0.18) -- (0.,0.2) -- cycle;
\draw [line width=0.8pt] (0.,5.)-- (5.8,5.);
\draw [line width=0.8pt] (0.,4.)-- (5.8,4.);
\draw [line width=0.8pt] (0.,0.2)-- (5.8,0.18);
\draw (-0.66,5.02) node[anchor=north west] {$\footnotesize R_{f}$};
\draw (4.7,0.26) node[anchor=north west] {$\footnotesize L_{a}=L_{e}$};
\draw [line width=0.8pt] (4.64,5.)-- (4.64015172233386,0.1839994768195382);
\draw [line width=0.8pt] (5.8,1.18)-- (0.,1.16);
\draw [line width=0.8pt] (1.24,5.)-- (1.2201234230270745,0.19579267785163076);
\draw [line width=0.8pt] (0.,5.)-- (0.,0.2);
\draw [line width=0.8pt] (5.8,5.)-- (5.8,0.18);
\draw (2.2,2.76) node[anchor=north west] {$\footnotesize \Psi^{-1} $};
\draw (0.06,5.18) node[anchor=north west] {$\footnotesize H_{f}$};
\draw [line width=1.2pt,dash pattern=on 5pt off 5pt] (4.74,0.44)-- (1.42,0.44);
\draw [line width=0.8pt,dash pattern=on 5pt off 5pt] (0.18,0.66)-- (0.2,3.8);
\draw (2.66,1.3) node[anchor=north west] {$\footnotesize \psi_{a^{*}}\vert_{_{_{H_{e}}}} $};
\draw (5.32,1.32) node[anchor=north west] {$\footnotesize H_{e}$};
\draw (0.38,3.32) node[anchor=north west] {$\footnotesize \phi_{a}\vert_{_{_{H_{a^{*}}}}} $};
\draw (-0.72,1.08) node[anchor=north west] {$\footnotesize R_{a^{*}}$};
\draw (4.86,0.96) node[anchor=north west] {$\footnotesize g$};
\draw [line width=0.8pt,dash pattern=on 5pt off 5pt] (1.42,3.78)-- (4.42,1.36);
\draw (0.4,0.94) node[anchor=north west] {$\footnotesize ga^{*}$};
\draw (0.28,4.72) node[anchor=north west] {$\footnotesize aga^{*}$};
\draw (0.62,1.38) node[anchor=north west] {$\footnotesize H_{a^{*}}$};
\begin{scriptsize}
\draw [fill=black] (4.74,0.44) circle (1.0pt);
\draw [fill=black,shift={(1.42,0.44)},rotate=90] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=black] (0.18,0.66) circle (1.0pt);
\draw [fill=black,shift={(0.2,3.8)}] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=black,shift={(1.42,3.78)},rotate=180] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\end{scriptsize}
\end{tikzpicture}
答案1
请不要生我的气,但坦率地说,你的数字有点……可以说是“不寻常”。你真的认为把东西塞进一小块区域会帮到别人吗?这个提议与 AndréC 的提议类似,但经过了一些非常温和的清理尝试,并附有说明。
\documentclass[10pt]{article}
\usepackage{tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows} % consider using arrows.meta instead
\pagestyle{empty}
\begin{document}
\definecolor{xdxdff}{rgb}{0.49019607843137253,0.49019607843137253,1.}
\definecolor{ududff}{rgb}{0.30196078431372547,0.30196078431372547,1.}
\definecolor{zzttqq}{rgb}{0.6,0.2,0.}\definecolor{zzttqq}{rgb}{0.6,0.2,0.}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\begin{scope}[local bounding box=left box]
\fill[line width=0.8pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (0.,5.) -- (1.24,5.) -- (1.2201234230270745,0.19579267785163076) -- (0.,0.2) -- cycle;
\fill[line width=0.8pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (4.64,5.) -- (5.8,5.) -- (5.8,0.18) -- (4.64015172233386,0.1839994768195382) -- cycle;
\draw [line width=0.8pt] (0.,5.)-- (5.8,5.);
\draw [line width=0.8pt] (0.,4.)-- (5.8,4.);
\draw [line width=0.8pt] (0.,0.2)-- (5.8,0.18);
\draw (0.2,0.3) node[anchor=north west] {$\scriptstyle L_{f}$};
\draw (4.7,0.26) node[anchor=north west] {$\scriptstyle L_{a}=L_{e}$};
\draw [line width=0.8pt] (4.64,5.)-- (4.64015172233386,0.1839994768195382);
\draw [line width=0.8pt] (5.8,1.18)-- (0.,1.16);
\draw [line width=0.8pt] (1.24,5.)-- (1.2201234230270745,0.19579267785163076);
\draw [line width=0.8pt] (0.,5.)-- (0.,0.2);
\draw [line width=0.8pt] (5.8,5.)-- (5.8,0.18);
\draw (0.62,4.76) node[anchor=north west] {$\scriptstyle h$};
\draw (4.7,4.76) node[anchor=north west] {$\scriptstyle ha$};
\draw (2.4,5.16) node[anchor=north west] {$\scriptstyle \psi_{a}\vert_{_{_{H_{f}}}} $};
\draw [line width=1.2pt] (1.04,4.3)-- (4.42,4.28);
\draw [line width=1.2pt] (5.5,4.2)-- (5.5,1.38);
\draw (4.68,3.34) node[anchor=north west] {$\scriptstyle \phi_{a^{*}}\vert_{_{_{H_{a}}}} $};
\draw (2.3,2.84) node[anchor=north west] {$\scriptstyle \Psi $};
\draw (4.74,1.28) node[anchor=north west] {$\scriptstyle a^{*}ha$};
\draw (0.06,5.18) node[anchor=north west] {$\scriptstyle H_{f}$};
\draw (5.32,5.18) node[anchor=north west] {$\scriptstyle H_{a}$};
\draw (5.26,0.86) node[anchor=north west] {$\scriptstyle H_{e}$};
\draw (-0.72,1.08) node[anchor=north west] {$\scriptstyle R_{e}$};
\draw [line width=0.8pt,dash pattern=on 5pt off 5pt] (1.42,3.78)-- (4.42,1.36);
\begin{scope}[font=\scriptsize]
\draw [fill=black,shift={(4.42,4.28)},rotate=270] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=black,shift={(5.5,1.38)},rotate=180] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=ududff] (1.04,4.3) circle (1.0pt);
\draw [fill=ududff] (5.5,4.2) circle (1.0pt);
\draw [fill=black,shift={(4.42,1.36)}] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
% \draw [fill=xdxdff] (-5.8,5.) circle (2.5pt);
% \draw[color=xdxdff] (-4.18,6.47) node {$G'$};
\end{scope}
\end{scope}
\node[anchor=north] at (left box.south){A caption.};
\begin{scope}[xshift=7.5cm,local bounding box=right box]
\fill[line width=2.pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (0.,5.) -- (5.8,5.) -- (5.8,4.) -- (0.,4.) -- cycle;
\fill[line width=2.pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (0.,1.16) -- (5.8,1.18) -- (5.8,0.18) -- (0.,0.2) -- cycle;
\draw [line width=0.8pt] (0.,5.)-- (5.8,5.);
\draw [line width=0.8pt] (0.,4.)-- (5.8,4.);
\draw [line width=0.8pt] (0.,0.2)-- (5.8,0.18);
\draw (-0.66,5.02) node[anchor=north west] {$\scriptstyle R_{f}$};
\draw (4.7,0.26) node[anchor=north west] {$\scriptstyle L_{a}=L_{e}$};
\draw [line width=0.8pt] (4.64,5.)-- (4.64015172233386,0.1839994768195382);
\draw [line width=0.8pt] (5.8,1.18)-- (0.,1.16);
\draw [line width=0.8pt] (1.24,5.)-- (1.2201234230270745,0.19579267785163076);
\draw [line width=0.8pt] (0.,5.)-- (0.,0.2);
\draw [line width=0.8pt] (5.8,5.)-- (5.8,0.18);
\draw (2.2,2.76) node[anchor=north west] {$\scriptstyle \Psi^{-1} $};
\draw (0.06,5.18) node[anchor=north west] {$\scriptstyle H_{f}$};
\draw [line width=1.2pt,dash pattern=on 5pt off 5pt] (4.74,0.44)-- (1.42,0.44);
\draw [line width=0.8pt,dash pattern=on 5pt off 5pt] (0.18,0.66)-- (0.2,3.8);
\draw (2.66,1.3) node[anchor=north west] {$\scriptstyle \psi_{a^{*}}\vert_{_{_{H_{e}}}} $};
\draw (5.32,1.32) node[anchor=north west] {$\scriptstyle H_{e}$};
\draw (0.38,3.32) node[anchor=north west] {$\scriptstyle \phi_{a}\vert_{_{_{H_{a^{*}}}}} $};
\draw (-0.72,1.08) node[anchor=north west] {$\scriptstyle R_{a^{*}}$};
\draw (4.86,0.96) node[anchor=north west] {$\scriptstyle g$};
\draw [line width=0.8pt,dash pattern=on 5pt off 5pt] (1.42,3.78)-- (4.42,1.36);
\draw (0.4,0.94) node[anchor=north west] {$\scriptstyle ga^{*}$};
\draw (0.28,4.72) node[anchor=north west] {$\scriptstyle aga^{*}$};
\draw (0.62,1.38) node[anchor=north west] {$\scriptstyle H_{a^{*}}$};
\begin{scope}[font=\scriptsize]
\draw [fill=black] (4.74,0.44) circle (1.0pt);
\draw [fill=black,shift={(1.42,0.44)},rotate=90] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=black] (0.18,0.66) circle (1.0pt);
\draw [fill=black,shift={(0.2,3.8)}] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=black,shift={(1.42,3.78)},rotate=180] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\end{scope}
\end{scope}
\node[anchor=north] at (right box.south){Another caption.};
\end{tikzpicture}
\end{document}
显然这还远远不够理想。不过,此时清理工作就交给你了。
- 你的 s 有什么
\clip
用处? - 因为你似乎认为使用小字体可以帮助读者:不,不是每个人都喜欢用放大镜来理解数字。数字是为了帮助人们理解事物,而不是为了阻止人们继续阅读。
- 不用说,但标签根本没有与图形元素对齐。
这真的不是想让你生我的气,但我真的觉得你在利用 Ti钾Z 不是以最佳方式。
为了让你们不那么生气,我把左边的图片翻译成了更接近 Ti 精神的东西钾Z。(你是怎么画你的图片的?Geocobra?Inkscape?)
\documentclass[10pt]{article}
\usepackage{tikz}
\usepackage{mathrsfs}
\usetikzlibrary{positioning,backgrounds,fit}
\usetikzlibrary{arrows} % consider using arrows.meta instead
\pagestyle{empty}
\begin{document}
\definecolor{xdxdff}{rgb}{0.49019607843137253,0.49019607843137253,1.}
\definecolor{ududff}{rgb}{0.30196078431372547,0.30196078431372547,1.}
\definecolor{zzttqq}{rgb}{0.6,0.2,0.}\definecolor{zzttqq}{rgb}{0.6,0.2,0.}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\begin{scope}[local bounding box=left box,line width=0.8pt]
\node (h) {$h$};
\node[above left=1.5pt of h] (Hf) {$H_f$};
\node[right=4cm of h] (ha) {$h\,a$};
\node[above right=1.5pt of ha] (Ha) {$H_{a\vphantom{f}}$};
\node[below=4cm of ha] (aha) {$a^*\,h\,a$};
\node[below right=1.5pt of aha] (He) {$H_e$};
\draw [line width=1.2pt,-latex] (h) -- (ha)
node[midway,above]{$\left.\psi_a\right|_{H_f}$};
\draw [line width=1.2pt,-latex] (ha) -- (aha)
node[midway,right]{$\left.\phi_{a^{*}}\right|_{H_{a}}$};
\draw[line width=0.8pt,dash pattern=on 5pt off 5pt,-latex] (h) -- (aha)
node[midway,above]{$\Psi$};;
\begin{scope}[on background layer]
\node[draw,fill=zzttqq,fill opacity=0.1,fit=(ha) (Ha) (aha) (He)] (fit1){};
\node[fit=(h) (Hf)] (aux1) {};
\draw[fill=zzttqq,fill opacity=0.1] (aux1.north west) rectangle (aux1.east
|-fit1.south);
\node[draw,inner sep=0pt,fit=(aux1) (fit1.north east)] (fit2){};
\node[fit=(aha) (He)] (aux2) {};
\node[draw,inner sep=0pt,fit=(aux2.north -| aux1.west) (fit1.south east)] (fit3){};
\end{scope}
\node[below=2pt of fit1.south] {$L_{a}=L_{e}$};
\node[below=2pt of aux1|-fit1.south] {$L_{f}$};
\node[left=2pt of aux1.west|-aux2] {$R_{c}$};
\end{scope}
\node[anchor=north] at (left box.south){A caption.};
% \begin{scope}[shift={([xshift=1cm,yshift=-2cm]left box.east)},local bounding box=right box]
% \fill[line width=2.pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (0.,5.) -- (5.8,5.) -- (5.8,4.) -- (0.,4.) -- cycle;
% \fill[line width=2.pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (0.,1.16) -- (5.8,1.18) -- (5.8,0.18) -- (0.,0.2) -- cycle;
% \draw [line width=0.8pt] (0.,5.)-- (5.8,5.);
% \draw [line width=0.8pt] (0.,4.)-- (5.8,4.);
% \draw [line width=0.8pt] (0.,0.2)-- (5.8,0.18);
% \draw (-0.66,5.02) node[anchor=north west] {$\scriptstyle R_{f}$};
% \draw (4.7,0.26) node[anchor=north west] {$\scriptstyle L_{a}=L_{e}$};
% \draw [line width=0.8pt] (4.64,5.)-- (4.64015172233386,0.1839994768195382);
% \draw [line width=0.8pt] (5.8,1.18)-- (0.,1.16);
% \draw [line width=0.8pt] (1.24,5.)-- (1.2201234230270745,0.19579267785163076);
% \draw [line width=0.8pt] (0.,5.)-- (0.,0.2);
% \draw [line width=0.8pt] (5.8,5.)-- (5.8,0.18);
% \draw (2.2,2.76) node[anchor=north west] {$\scriptstyle \Psi^{-1} $};
% \draw (0.06,5.18) node[anchor=north west] {$\scriptstyle H_{f}$};
% \draw [line width=1.2pt,dash pattern=on 5pt off 5pt] (4.74,0.44)-- (1.42,0.44);
% \draw [line width=0.8pt,dash pattern=on 5pt off 5pt] (0.18,0.66)-- (0.2,3.8);
% \draw (2.66,1.3) node[anchor=north west] {$\scriptstyle \psi_{a^{*}}\vert_{_{_{H_{e}}}} $};
% \draw (5.32,1.32) node[anchor=north west] {$\scriptstyle H_{e}$};
% \draw (0.38,3.32) node[anchor=north west] {$\scriptstyle \phi_{a}\vert_{_{_{H_{a^{*}}}}} $};
% \draw (-0.72,1.08) node[anchor=north west] {$\scriptstyle R_{a^{*}}$};
% \draw (4.86,0.96) node[anchor=north west] {$\scriptstyle g$};
% \draw [line width=0.8pt,dash pattern=on 5pt off 5pt] (1.42,3.78)-- (4.42,1.36);
% \draw (0.4,0.94) node[anchor=north west] {$\scriptstyle ga^{*}$};
% \draw (0.28,4.72) node[anchor=north west] {$\scriptstyle aga^{*}$};
% \draw (0.62,1.38) node[anchor=north west] {$\scriptstyle H_{a^{*}}$};
% \begin{scope}[font=\scriptsize]
% \draw [fill=black] (4.74,0.44) circle (1.0pt);
% \draw [fill=black,shift={(1.42,0.44)},rotate=90] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
% \draw [fill=black] (0.18,0.66) circle (1.0pt);
% \draw [fill=black,shift={(0.2,3.8)}] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
% \draw [fill=black,shift={(1.42,3.78)},rotate=180] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
% \end{scope}
% \end{scope}
% \node[anchor=north] at (right box.south){Another caption.};
\end{tikzpicture}
\end{document}
现在你可以自己翻译第二张图片了。第一次这样做时,这需要一些努力。然而,我想说,很快就会有回报,因为你将能够通过简单的开关进行全局调整。你将不太可能遇到难以解决的问题。最后但并非最不重要的是,你会发现,与使用某些界面绘制图片不同,这真的很有趣。
答案2
可以利用TikZ
将两个图形并排放置在scope
环境中的力量,将第二个图形向右移动。
\end{scope}
% \end{tikzpicture}
% \hfil
% \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\begin{scope}[xshift=6.8cm]
然后在 Tikz 中放置一个图例node
。
\node at (2,-.5) {Legend \#1};
更新:
我没有正确理解您的请求,以下是尊重您利润的更正。它通过包显示showframe
。我不得不将您的数字减少一个因子,0.8
以便它们包含在您的行中。
我修改了clip
你的图形。geogebra 并没有将其最小化clip
。
%\draw(-.6,-1) rectangle (6.3,5.5);
\clip(-.6,-1) rectangle (6.3,5.5);
我没有修改或简化显然是用 geogebra 生成的其余代码。
\documentclass[10pt]{article}
\usepackage{showframe}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{xdxdff}{rgb}{0.49019607843137253,0.49019607843137253,1.}
\definecolor{ududff}{rgb}{0.30196078431372547,0.30196078431372547,1.}
\definecolor{zzttqq}{rgb}{0.6,0.2,0.}\definecolor{zzttqq}{rgb}{0.6,0.2,0.}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,scale=.8]
\begin{scope}
%\draw(-.6,-1) rectangle (6.3,5.5);
\clip(-.6,-1) rectangle (6.3,5.5);
\fill[line width=0.8pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (0.,5.) -- (1.24,5.) -- (1.2201234230270745,0.19579267785163076) -- (0.,0.2) -- cycle;
\fill[line width=0.8pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (4.64,5.) -- (5.8,5.) -- (5.8,0.18) -- (4.64015172233386,0.1839994768195382) -- cycle;
\draw [line width=0.8pt] (0.,5.)-- (5.8,5.);
\draw [line width=0.8pt] (0.,4.)-- (5.8,4.);
\draw [line width=0.8pt] (0.,0.2)-- (5.8,0.18);
\draw (0.2,0.3) node[anchor=north west] {$\footnotesize L_{f}$};
\draw (4.7,0.26) node[anchor=north west] {$\footnotesize L_{a}=L_{e}$};
\draw [line width=0.8pt] (4.64,5.)-- (4.64015172233386,0.1839994768195382);
\draw [line width=0.8pt] (5.8,1.18)-- (0.,1.16);
\draw [line width=0.8pt] (1.24,5.)-- (1.2201234230270745,0.19579267785163076);
\draw [line width=0.8pt] (0.,5.)-- (0.,0.2);
\draw [line width=0.8pt] (5.8,5.)-- (5.8,0.18);
\draw (0.62,4.76) node[anchor=north west] {$\footnotesize h$};
\draw (4.7,4.76) node[anchor=north west] {$\footnotesize ha$};
\draw (2.4,5.16) node[anchor=north west] {$\footnotesize \psi_{a}\vert_{_{_{H_{f}}}} $};
\draw [line width=1.2pt] (1.04,4.3)-- (4.42,4.28);
\draw [line width=1.2pt] (5.5,4.2)-- (5.5,1.38);
\draw (4.68,3.34) node[anchor=north west] {$\footnotesize \phi_{a^{*}}\vert_{_{_{H_{a}}}} $};
\draw (2.3,2.84) node[anchor=north west] {$\footnotesize \Psi $};
\draw (4.74,1.28) node[anchor=north west] {$\footnotesize a^{*}ha$};
\draw (0.06,5.18) node[anchor=north west] {$\footnotesize H_{f}$};
\draw (5.32,5.18) node[anchor=north west] {$\footnotesize H_{a}$};
\draw (5.26,0.86) node[anchor=north west] {$\footnotesize H_{e}$};
\draw (-0.72,1.08) node[anchor=north west] {$\footnotesize R_{e}$};
\draw [line width=0.8pt,dash pattern=on 5pt off 5pt] (1.42,3.78)-- (4.42,1.36);
\begin{scriptsize}
\draw [fill=black,shift={(4.42,4.28)},rotate=270] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=black,shift={(5.5,1.38)},rotate=180] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=ududff] (1.04,4.3) circle (1.0pt);
\draw [fill=ududff] (5.5,4.2) circle (1.0pt);
\draw [fill=black,shift={(4.42,1.36)}] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=xdxdff] (-5.8,5.) circle (2.5pt);
\draw[color=xdxdff] (-4.18,6.47) node {$G'$};
\end{scriptsize}
\node at (2,-.5) {Legend \#1};
\end{scope}
% \end{tikzpicture}
% \hfil
% \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\begin{scope}[xshift=6.8cm]
%\draw(-.6,-1) rectangle (6.3,5.5);
\clip(-.6,-1) rectangle (6.3,5.5);
\fill[line width=2.pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (0.,5.) -- (5.8,5.) -- (5.8,4.) -- (0.,4.) -- cycle;
\fill[line width=2.pt,color=zzttqq,fill=zzttqq,fill opacity=0.10000000149011612] (0.,1.16) -- (5.8,1.18) -- (5.8,0.18) -- (0.,0.2) -- cycle;
\draw [line width=0.8pt] (0.,5.)-- (5.8,5.);
\draw [line width=0.8pt] (0.,4.)-- (5.8,4.);
\draw [line width=0.8pt] (0.,0.2)-- (5.8,0.18);
\draw (-0.66,5.02) node[anchor=north west] {$\footnotesize R_{f}$};
\draw (4.7,0.26) node[anchor=north west] {$\footnotesize L_{a}=L_{e}$};
\draw [line width=0.8pt] (4.64,5.)-- (4.64015172233386,0.1839994768195382);
\draw [line width=0.8pt] (5.8,1.18)-- (0.,1.16);
\draw [line width=0.8pt] (1.24,5.)-- (1.2201234230270745,0.19579267785163076);
\draw [line width=0.8pt] (0.,5.)-- (0.,0.2);
\draw [line width=0.8pt] (5.8,5.)-- (5.8,0.18);
\draw (2.2,2.76) node[anchor=north west] {$\footnotesize \Psi^{-1} $};
\draw (0.06,5.18) node[anchor=north west] {$\footnotesize H_{f}$};
\draw [line width=1.2pt,dash pattern=on 5pt off 5pt] (4.74,0.44)-- (1.42,0.44);
\draw [line width=0.8pt,dash pattern=on 5pt off 5pt] (0.18,0.66)-- (0.2,3.8);
\draw (2.66,1.3) node[anchor=north west] {$\footnotesize \psi_{a^{*}}\vert_{_{_{H_{e}}}} $};
\draw (5.32,1.32) node[anchor=north west] {$\footnotesize H_{e}$};
\draw (0.38,3.32) node[anchor=north west] {$\footnotesize \phi_{a}\vert_{_{_{H_{a^{*}}}}} $};
\draw (-0.72,1.08) node[anchor=north west] {$\footnotesize R_{a^{*}}$};
\draw (4.86,0.96) node[anchor=north west] {$\footnotesize g$};
\draw [line width=0.8pt,dash pattern=on 5pt off 5pt] (1.42,3.78)-- (4.42,1.36);
\draw (0.4,0.94) node[anchor=north west] {$\footnotesize ga^{*}$};
\draw (0.28,4.72) node[anchor=north west] {$\footnotesize aga^{*}$};
\draw (0.62,1.38) node[anchor=north west] {$\footnotesize H_{a^{*}}$};
\begin{scriptsize}
\draw [fill=black] (4.74,0.44) circle (1.0pt);
\draw [fill=black,shift={(1.42,0.44)},rotate=90] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=black] (0.18,0.66) circle (1.0pt);
\draw [fill=black,shift={(0.2,3.8)}] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\draw [fill=black,shift={(1.42,3.78)},rotate=180] (0,0) ++(0 pt,2.25pt) -- ++(1.9485571585149868pt,-3.375pt)--++(-3.8971143170299736pt,0 pt) -- ++(1.9485571585149868pt,3.375pt);
\end{scriptsize}
\node at (2,-.5) {Legend \#2};
\end{scope}
\end{tikzpicture}
\end{document}