页面成员如何。我正在尝试制作这个同伦图。我正在尝试将图像中出现的矩形旋转 90 度。我如何在代码中执行此操作。谢谢。这是我拥有的代码:
\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,calc,shapes,decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}
\node at (0,0) {$H: I \times I \rightarrow G$};
\node[label=below:$z_1$] (x1) at (6,0) {$\bullet$};
\node[label=above:$z_0$] (x0) at (9,4) {$\bullet$};
\node at (9.5,2) {$\subset G$};
\draw (x1.center) to [out=5,in=-90]++(2.8,1.8) to[out=90,in=-95](x0.center);
\draw (x1.center) to [out=10,in=-110]++(2.6,2) to[out=70,in=-103]
(x0.center);
\draw (x1.center) to [out=15,in=-105](x0.center);
\draw (x1.center) to [out=30,in=-150](x0.center);
\draw (x1.center) to [out=45,in=-170](x0.center);
\draw (x1.center) to [out=50,in=-105]++(1.2,3)to [out=75,in=-172]
(x0.center);
\draw (x1.center) to [out=55,in=-100]++(1.0,3) to[out=80,in=-175]
(x0.center);
\draw (x1.center) to [out=60,in=-90]++(0.8,3) to[out=90,in=-180]
(x0.center);
\begin{scope}[every node/.style={draw, anchor=text, rectangle split,
rectangle split parts=7,minimum width=2cm}]
\node (R) at (2,4){ \nodepart{two} \nodepart{three}
\nodepart{four}$I\times I$\nodepart{five}\nodepart{six}\nodepart{seven}};
\end{scope}
\draw[decorate,decoration={brace,mirror,raise=6pt,amplitude=10pt}, thick]
(R.north west)--(R.south west) ;
\draw[decorate,decoration={brace,raise=6pt,amplitude=10pt}, thick]
(R.north east)--(R.south east);
\draw[->] ($(R.west)+(-20pt,0)$) to[out=-180,in=240] ++(0,2)
to [out=60,in=120]node[above,midway]{$H(0,t)$}(x0) ;
\draw[->] ($(R.north)+(0,10pt)$) to [out=60,in=120]
node[above,midway]{$\gamma_0 \simeq \gamma_1$} ++(4.5,-1) ;
\draw[->] ($(R.east)+(20pt,0)$) to [out=0,in=140]
node[right,midway]{$H(1,t)$}(x1) ;
\draw[->] ($(R.south)+(0,-20pt)$) to [out=-85,in=-30]
node[below,midway]{$\alpha$}++(7,0) ;
\end{tikzpicture}
\end{document}
答案1
分割的矩形形状有一个开关可以使其变为水平:rectangle split horizontal=true
\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,calc,shapes,decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}
\begin{scope}[every node/.style={draw, anchor=text, rectangle split,
rectangle split parts=7,minimum height=2cm,rectangle split horizontal}]
\node (R) at (2,4){};
\end{scope}
\end{tikzpicture}
\end{document}
完整的 MWE(一些硬编码坐标必须调整):
\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,calc,shapes,decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}
\node at (0,0) {$H: I \times I \rightarrow G$};
\node[label=below:$z_1$] (x1) at (6,0) {$\bullet$};
\node[label=above:$z_0$] (x0) at (9,4) {$\bullet$};
\node at (9.5,2) {$\subset G$};
\draw (x1.center) to [out=5,in=-90]++(2.8,1.8) to[out=90,in=-95](x0.center);
\draw (x1.center) to [out=10,in=-110]++(2.6,2) to[out=70,in=-103]
(x0.center);
\draw (x1.center) to [out=15,in=-105](x0.center);
\draw (x1.center) to [out=30,in=-150](x0.center);
\draw (x1.center) to [out=45,in=-170](x0.center);
\draw (x1.center) to [out=50,in=-105]++(1.2,3)to [out=75,in=-172]
(x0.center);
\draw (x1.center) to [out=55,in=-100]++(1.0,3) to[out=80,in=-175]
(x0.center);
\draw (x1.center) to [out=60,in=-90]++(0.8,3) to[out=90,in=-180]
(x0.center);
\begin{scope}[every node/.style={draw, anchor=text, rectangle split,
rectangle split parts=7,minimum height=2cm,rectangle split horizontal}]
\node (R) at (0,2){ \nodepart{two} \nodepart{three}
\nodepart{four}\rotatebox{90}{$I\times I$}\nodepart{five}\nodepart{six}\nodepart{seven}};
\end{scope}
\draw[decorate,decoration={brace,mirror,raise=6pt,amplitude=10pt}, thick]
(R.north west)--(R.south west) ;
\draw[decorate,decoration={brace,raise=6pt,amplitude=10pt}, thick]
(R.north east)--(R.south east);
\draw[->] ($(R.west)+(-20pt,0)$) to[out=-180,in=240] ++(0,2)
to [out=60,in=120]node[above,midway]{$H(0,t)$}(x0) ;
\draw[->] ($(R.north)+(0,10pt)$) to [out=60,in=120] node[above,midway]{$\gamma_0 \simeq \gamma_1$} ++(5.4,0.4) ;
\draw[->] ($(R.east)+(20pt,0)$) to [out=0,in=140]
node[right,midway]{$H(1,t)$}(x1) ;
\draw[->] ($(R.south)+(0,-20pt)$) to [out=-85,in=-30]
node[below,midway]{$\alpha$}++(7,0) ;
\end{tikzpicture}
\end{document}
(旋转的想法I \times I
借鉴自@marmot - 非常感谢这个想法!)