我想在 TikZ 中绘制电感器的镜像,这样如果设备水平绘制,凸块就会位于下侧而不是上侧。有人知道如何做到这一点吗?如能提供帮助,我将不胜感激。
答案1
你可以反转坐标:
\documentclass[tikz]{standalone}
\usetikzlibrary{circuits.ee.IEC}
\begin{document}
\begin{tikzpicture}[circuit ee IEC]
\draw (0,0) to [inductor] (2,0); %% here draw from left to right
\draw (2,-1) to [inductor] (0,-1); %% here draw from right to left
\end{tikzpicture}
\end{document}
您还可以旋转电感器:
\documentclass[tikz,border=5]{standalone}
\usetikzlibrary{circuits.ee.IEC}
\begin{document}
\begin{tikzpicture}[every inductor/.style={rotate=180},circuit ee IEC]
\draw (0,0) to [inductor] (2,0);
\draw (2,-1) to [inductor] (0,-1);
\end{tikzpicture}
\end{document}