Tx · LaTeX & TikZ

How to Draw Electric Network One-Line Diagrams in TikZ

Published By the 9to5Science editorial team

At a glance

  1. 1. Choose the topology

    List the buses and components, then decide how they connect before positioning anything.

  2. 2. Place symbols

    Use TikZ nodes for generators, breakers, transformers, and loads; use thick lines for busbars.

  3. 3. Connect components

    Draw straight segments between symbol boundaries and bus connection points.

  4. 4. Label and compile

    Add equipment names and ratings, then compile the complete example with TikZ loaded.

A power-system one-line diagram represents a three-phase network with a single line and simplified equipment symbols. You can draw one in TikZ by placing symbols as nodes and joining them with line segments. This gives you precise control over the layout and makes it easy to revise the network as it changes.

The example below shows a generator connected through a breaker and transformer to a busbar and load. Its symbols are schematic rather than a claim about one universal drafting standard; use the conventions required by your course, utility, or engineering standard.

A complete TikZ example

The following file compiles on its own. It uses only the tikz package; the equipment symbols are drawn with basic TikZ shapes rather than a specialized circuit package.

\documentclass[tikz,border=6pt]{standalone}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[
  wire/.style={draw, thick},
  bus/.style={draw, line width=2pt},
  label/.style={font=\small, align=center}
]
  % Electrical connections
  \draw[wire] (0.28,0) -- (0.78,0);
  \draw[wire] (1.02,0) -- (1.53,0);
  \draw[wire] (2.27,0) -- (3.2,0);
  \draw[wire] (3.2,0) -- (4.45,0);

  % Generator
  \node[draw, circle, minimum size=0.56cm, inner sep=0pt] at (0,0) {G};
  \node[label, below=3pt] at (0,-0.32) {Generator};

  % Circuit breaker (a small rectangular symbol in series)
  \draw[fill=white] (0.78,-0.12) rectangle (1.02,0.12);
  \node[label, above=4pt] at (0.9,0.12) {CB};

  % Transformer (two overlapping winding circles)
  \draw (1.75,0) circle (0.22);
  \draw (2.05,0) circle (0.22);
  \node[label, below=5pt] at (1.9,-0.23) {Transformer};

  % Busbar
  \draw[bus] (3.2,-0.55) -- (3.2,0.55);
  \node[label, above=4pt] at (3.2,0.55) {Bus 1};

  % Load
  \node[draw, fill=white, anchor=west, minimum width=0.7cm, minimum height=0.45cm,
        inner sep=1pt] at (4.45,0) {Load};
\end{tikzpicture}
\end{document}

The standalone document class crops the output to the drawing and is convenient when you want to include the diagram in another document. If you prefer a regular article, replace standalone with article, put the tikzpicture inside the document body, and load TikZ with \usepackage{tikz} in the preamble.

How the layout works

The coordinates set the positions of the equipment: the generator is centered at (0,0), the breaker lies in the connecting line, and the busbar is the vertical segment at x=3.2. The line from the transformer ends at the busbar’s center. The load box begins at x=4.45, so the wire meets its left edge.

TikZ draws each \draw command in sequence. In this example the wires are drawn first, followed by the equipment symbols and labels. Drawing symbols afterward keeps the white-filled breaker and load boxes visually clear where they meet the wires. The transformer circles overlap slightly to suggest coupled windings; replace them with the symbol required by your chosen convention if necessary.

The wire and bus styles keep line formatting consistent. The busbar uses a heavier stroke so it is easy to distinguish from a branch connection. You can change the style once near the start of the picture rather than editing every line individually.

Adding branches and equipment

A network with multiple outgoing feeders can branch from the busbar by drawing additional lines to other component nodes. For example, a feeder could leave the bus at a second point and run downward to a load. Use coordinates to make the topology explicit, and add labels such as bus names, voltage levels, breaker identifiers, and equipment ratings where your diagram requires them.

For larger drawings, define reusable styles or TikZ node shapes for repeated symbols. If you have a lot of electrical components and need a library of standard circuit symbols, consider circuitikz. For power-system diagrams, however, you may still prefer custom TikZ symbols because the exact one-line conventions and equipment details differ from ordinary component-level circuit schematics.

Common mistakes

  • Connecting to the wrong point: A wire that stops just short of a symbol or busbar can look connected without actually being connected. Match endpoint coordinates exactly.
  • Drawing wires over symbols: Draw connections first and symbols afterward, or use a white fill for symbols that should cover a line.
  • Confusing a branch line with a busbar: Give busbars a distinct weight or orientation, and label them clearly.
  • Treating a schematic symbol as universal: Equipment symbols differ among standards and organizations. Follow the convention relevant to the diagram rather than assuming this illustrative style is normative.
  • Making the drawing hard to maintain: Avoid scattering unexplained coordinates throughout a long file. Use named coordinates, styles, or reusable macros when the network grows.

References

  1. The TikZ and PGF Packages: Manual

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.