我使用以下代码制作曲线的镜像。是否可以避免文本反转。
\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[scale=.9, transform shape]
\draw [very thick, red] (.8,-2.6) to [out=20,in=-125, looseness=1.] +(42.:2.4cm) node [red, xshift=.4cm, yshift=.2cm] {$AS$};
\begin{scope}[xscale=-1,xshift=-4cm]
\draw [very thick, blue] (.8,-2.6) to [out=20,in=-125, looseness=1.] +(42.:2.4cm) node [blue, xshift=.4cm, yshift=.2cm] {$AS$};
\end{scope}
\end{tikzpicture}
\end{document}
答案1
要重新反转文本,请使用\scalebox{-1}[1]{$AS$}
。
\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[scale=.9, transform shape]
\draw [very thick, red] (.8,-2.6) to [out=20,in=-125, looseness=1.] +(42.:2.4cm)
node [red, xshift=.4cm, yshift=.2cm] {$AS$};
\begin{scope}[xscale=-1,xshift=-4cm]
\draw [very thick, blue] (.8,-2.6) to [out=20,in=-125, looseness=1.] +(42.:2.4cm)
node [blue, xshift=.4cm, yshift=.2cm] {\scalebox{-1}[1]{$AS$}};
\end{scope}
\end{tikzpicture}
\end{document}
答案2
要么放弃transform shape
\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[scale=.9]
\draw [very thick, red] (.8,-2.6) to [out=20,in=-125, looseness=1.] +(42.:2.4cm) node [red, xshift=.4cm, yshift=.2cm] {$AS$};
\begin{scope}[xscale=-1,xshift=-4cm]
\draw [very thick, blue] (.8,-2.6) to [out=20,in=-125, looseness=1.]
+(42.:2.4cm) node [blue, xshift=-.4cm, yshift=.2cm] {$AS$};
\end{scope}
\end{tikzpicture}
\end{document}
或添加xscale=-1
到节点选项
\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[scale=.9, transform shape]
\draw [very thick, red] (.8,-2.6) to [out=20,in=-125, looseness=1.] +(42.:2.4cm) node [red, xshift=.4cm, yshift=.2cm] {$AS$};
\begin{scope}[xscale=-1,xshift=-4cm]
\draw [very thick, blue] (.8,-2.6) to [out=20,in=-125, looseness=1.]
+(42.:2.4cm) node [blue, xshift=.4cm, yshift=.2cm,xscale=-1] {$AS$};
\end{scope}
\end{tikzpicture}
\end{document}
产生与以下相同的输出史蒂文的回答。