# Circuitikz different ground symbol

Is it possible to make circuitikz draw a different ground symbol? I would like to have a ground symbol with only one horizontal line. Thanks.

-
Of course it is. There is more than one solution, but if you could post an image of the symbol that you need (or a link), it would be easier for us (it sounds quite unusual to me). –  Luigi Sep 29 '12 at 17:39

The easiest way is to draw the line by yourself, as suggested Thanos. You can also redefine circuitikz ground code or add a new ground symbol. Here is an example:

\documentclass{standalone}
\usepackage{circuitikz}
\makeatletter
\pgfdeclareshape{ground}{
\anchor{center}{
\pgfpointorigin
}
\behindforegroundpath{
\pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen

\pgfscope
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}}
\pgfusepath{draw}

\pgfsetlinewidth{6\pgflinewidth} % thickness

\pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}}
\pgfusepath{draw}
\endpgfscope
}
}
\makeatother

\begin{document}
\begin{circuitikz}[american voltages]
\draw
(0,0) node [ground] {}
to [V] (0,2)
;
\end{circuitikz}
\end{document}


You can change the value in the line with the comment "thickness" even with a natural value (i.e. 3pt).

-
Very nice thought! –  Thanos Sep 29 '12 at 20:03

You can do it manually, by just adding a line at a specific point. The following code produces

\begin{figure}[H]
\centering

\begin{tikzpicture}
\node [cylinder, gray,fill=gray!30, rotate=0, draw,
minimum height=5cm, minimum width=2.5cm] (c){Ανιχνευτής Αερίου};
\draw[red,-] (-2,0) -- (2.5,0);
\draw[gray,fill=gray, path fading=south] (2.45,0) ellipse (0.15cm and 0.8cm);
%  \draw [-] (0,-1.25) arc [radius=2cm, start angle=0, end angle=90];
\draw[gray,dashed] (-2,-1.25) arc (-30:30:2.5cm);
\node at (-2,-0.03) (O) {$\bullet$};
\draw[black,-] (-2,0) -- (-3,0);
\draw (-3,0.2) -- (-3,-0.2);
\draw (-3,0.2) -- (-3.3,0);
\draw (-3,-0.2) -- (-3.3,0);
\draw (1,-1.25) -- (1,-1.7);

\draw (0.8,-1.7) -- (1.2,-1.7);
\draw (0.85,-1.75) -- (1.15,-1.75);
\draw (0.9,-1.8) -- (1.1,-1.8);
\draw (0.95,-1.85) -- (1.05,-1.85);

\draw (-2.5,0) -- (-2.5,1.5);
\node at (-2.5,1.5) (O) {$\bullet$};

%  text
\draw[red] (0,0.1) node[above right] {\footnotesize Κάθοδος};
\draw (-1.9,0.8) node[above right] {\footnotesize Άνοδος};
\draw[gray] (2.8,0) node[above right] {\footnotesize Παράθυρο};
\draw[gray] (2.8,-0.3) node[above right] {\footnotesize Ανιχνευτή};
\draw[black] (-4,0) node[above right] {\footnotesize Σήμα};
\draw[red] (-2.7,1.5) node[above right] {\footnotesize $+V_0$};
%  \draw[red, -] (c.top)   -- (c.bottom)
%    node [at end, below, black]   {height};
%  \draw[red, <->] (c.north) -- (c.south)
%    node [at start, above, black] {width};
\end{tikzpicture}
\label{fig:gasDetector}
\caption{Βασική δομή ανιχνευτή αερίου}
\end{figure}


This should be the simplest, yet most anorthodox way of doing it! I hope it helps!

-
what has this code got to do with circuitikz? –  Luigi Sep 29 '12 at 17:42
If you see my code, you will discover that groun wasn't made by node[ground] but anorthodoxically by just drawing lines. So he can manualy draw two lines (one vertical and one horizontal) in order to get his one line ground! That's the whole idea! –  Thanos Sep 29 '12 at 17:58