Graphics, Figures & TablesGetting smaller legend & small part of meshes in circuitikz

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
MelinaB
Posts: 1
Joined: Mon Jun 16, 2014 6:11 pm

Getting smaller legend & small part of meshes in circuitikz

Post by MelinaB »

Hello everyone,

I am a real newbie in Circuitikz.
I want to get a very simple electrical diagram. It is made of 16 identical electric meshes. But as I don't want to get all these meshes in my paper, only two or three, I would like to know how to get like "small line of dots" at the end, for explaining the fact that all the meshes are not drawn.

Then, do you know how to get smaller legends under elements?

Here is my code, and sorry if it isn't optimal ;)

Code: Select all

\begin{figure}[!h]
\centering
\begin{circuitikz}[scale=0.6, european]
\ctikzset {bipoles/thickness=1}
\draw (0,0) to[C, l_=$C_{ER}^1$] (4,0) to[C, l_=$C_{leg}^1$] (4,2);
\draw (4,2) to (5,2);
\draw (4,2) to (3,2);
\draw (5,2) to [C, l_=$C_{leg}^1$] (5,4);
\draw (3,2) to [I ] (3,4);
\draw (3,4) to (5,4);
\draw (4,4) to [C, l_=$C_{leg}^1$] (4,6);
\draw (0,6) to [C, l^=$C_{ER}^1$] (4,6);

\draw (4,0) to[C, l_=$C_{ER}^2$] (9,0) to[C, l_=$C_{leg}^2$] (9,2);
\draw (9,2) to (10,2);
\draw (9,2) to (8,2);
\draw (10,2) to [C, l_=$C_{leg}^2$] (10,4);
\draw (8,2) to [I ] (8,4);
\draw (8,4) to (10,4);
\draw (9,4) to [C, l_=$C_{leg}^2$] (9,6);
\draw (4,6) to [C, l^=$C_{ER}^2$] (9,6);

\draw (9,6) to [C, l^=$C_{ER}^3$] (13,6);
\draw (9,0) to [C, l_=$C_{ER}^3$] (13,0);

\end{circuitikz}
\caption{Essai\label{fig:fig_1}}
\end{figure}
Thank you for your help and answer,

Melina
Last edited by cgnieder on Tue Jun 17, 2014 11:36 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Getting smaller legend & small part of meshes in circuitikz

Post by Johannes_B »

You can do this using font=\<fontsize>

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}[scale=0.6, european,font=\scriptsize]
\ctikzset {bipoles/thickness=1}
\draw (0,0) to[C, l_=$C_\text{ER}^1$] (4,0) to[C, l_=$C_\text{leg}^1$] (4,2);
%Maybe you want the indices to be text, not independant
%mathematical variables
\draw (4,2) to (5,2);
\draw (4,2) to (3,2);
\draw (5,2) to [C, l_=$C_{leg}^1$] (5,4);
\draw (3,2) to [I ] (3,4);
\draw (3,4) to (5,4);
\draw (4,4) to [C, l_=$C_{leg}^1$] (4,6);
\draw (0,6) to [C, l^=$C_{ER}^1$] (4,6);

\draw (4,0) to[C, l_=$C_{ER}^2$] (9,0) to[C, l_=$C_{leg}^2$] (9,2);
\draw (9,2) to (10,2);
\draw (9,2) to (8,2);
\draw (10,2) to [C, l_=$C_{leg}^2$] (10,4);
\draw (8,2) to [I ] (8,4);
\draw (8,4) to (10,4);
\draw (9,4) to [C, l_=$C_{leg}^2$] (9,6);
\draw (4,6) to [C, l^=$C_{ER}^2$] (9,6);

\draw (9,6) to [C, l^=$C_{ER}^3$] (13,6);
\draw (9,0) to [C, l_=$C_{ER}^3$] (13,0);

\end{circuitikz}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm

Getting smaller legend & small part of meshes in circuitikz

Post by esdd »

You can add circle nodes on the right side using a foreach loop:

Code: Select all

\foreach \y in {0,3,6}
  \foreach \i in {1,2,3}
    \node[circle,fill,inner sep=0.5*\pgflinewidth,xshift=\i*0.5em] at (13,\y){};
circuitikz1.png
circuitikz1.png (11.91 KiB) Viewed 4597 times
Code:

Code: Select all

\documentclass[border=5pt]{standalone}

\usepackage{circuitikz}

\begin{document}
\begin{circuitikz}[scale=0.6, european, font=\scriptsize]
\ctikzset {bipoles/thickness=1}
\draw (0,0) to[C, l_=$C_{ER}^1$] (4,0) to[C, l_=$C_{leg}^1$] (4,2);
\draw (4,2) to (5,2);
\draw (4,2) to (3,2);
\draw (5,2) to [C, l_=$C_{leg}^1$] (5,4);
\draw (3,2) to [I ] (3,4);
\draw (3,4) to (5,4);
\draw (4,4) to [C, l_=$C_{leg}^1$] (4,6);
\draw (0,6) to [C, l^=$C_{ER}^1$] (4,6);

\draw (4,0) to[C, l_=$C_{ER}^2$] (9,0) to[C, l_=$C_{leg}^2$] (9,2);
\draw (9,2) to (10,2);
\draw (9,2) to (8,2);
\draw (10,2) to [C, l_=$C_{leg}^2$] (10,4);
\draw (8,2) to [I ] (8,4);
\draw (8,4) to (10,4);
\draw (9,4) to [C, l_=$C_{leg}^2$] (9,6);
\draw (4,6) to [C, l^=$C_{ER}^2$] (9,6);

\draw (9,6) to [C, l^=$C_{ER}^3$] (13,6);
\draw (9,0) to [C, l_=$C_{ER}^3$] (13,0);

\foreach \y in {0,3,6}
  \foreach \i in {1,2,3}
    \node[circle,fill,inner sep=0.5*\pgflinewidth,xshift=\i*0.5em] at (13,\y){};

\end{circuitikz}
\end{document}
Post Reply