我只想翻转饼图中“山核桃”和“桃子”的节点。
\documentclass{amsart}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\coordinate (O) at (0,0);
\draw (O) circle (3);
\draw (O) -- (0:3);
\draw (O) -- (120:3);
\draw (O) -- (210:3);
\draw (O) -- (230:3);
\draw (O) -- (270:3);
\draw (O) -- (310:3);
\path (O) -- node{Vanilla} (60:3);
\path (O) -- node{Chocolate} (165:3);
\path (O) -- node[rotate=220]{Pecan} (220:3);
\path (O) -- node[rotate=250]{Peach} (250:3);
\path (O) -- node{Mint} (290:3);
\path (O) -- node[rotate=335]{Strawberry} (335:3);
\end{tikzpicture}
\end{document}
答案1
您的意思是将标签旋转到另一个方向?像这样:
\documentclass{amsart}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\coordinate (O) at (0,0);
\draw (O) circle (3);
\draw (O) -- (0:3);
\draw (O) -- (120:3);
\draw (O) -- (210:3);
\draw (O) -- (230:3);
\draw (O) -- (270:3);
\draw (O) -- (310:3);
\path (O) -- node{Vanilla} (60:3);
\path (O) -- node{Chocolate} (165:3);
\path (O) -- node[rotate=45]{Pecan} (220:3);
\path (O) -- node[rotate=70]{Peach} (250:3);
\path (O) -- node{Mint} (290:3);
\path (O) -- node[rotate=335]{Strawberry} (335:3);
\end{tikzpicture}
\end{document}