I wish to draw a ground symbol in a circuit diagram using the circuits.ee.IEC TiKZ library. The example in the PGF Manual (pdf) on page 311 shows exactly what I want. However, when I try to draw it, the wire is extended beyond the ground symbol:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC}
\begin{document}
\begin{tikzpicture}[circuit ee IEC]
\draw (0,0) to[ground] (3,0);
\end{tikzpicture}
\end{document}
How do I fix this, so the ground symbol ends the wire as in the example?
Best Answer
You can supply
pos=1
to theground
key to position the symbol at the end of the line instead of in the middle:Or, as percusse suggested in a comment, you could place the symbol as a "proper" node instead of passing it to the
to
keyword. Note that you'll have to supply an empty set of brackets and use theright
keyword (and an appropriaterotate
option if the wire isn't going from left to right).