You can define the direction of the label by using label=<angle>:<label text>
. To specify the distance on a per node distance, you have to supply it to the label
options: label={[label distance=<distance>]<angle>:<label text>}
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[
every node/.style=draw,
every label/.style=draw
]
\node [label={[label distance=1cm]30:label}] {Node};
\end{tikzpicture}
\end{document}
Is that about right? Are you sure it wouldn't be easier just to stick a node with text where you want it?
\documentclass[a4paper,oneside,titlepage]{article}
\usepackage[utf8]{inputenc}
\usepackage[siunitx]{circuitikz}
\usepackage{tikz}
\usepackage{siunitx}
\begin{document}
\begin{circuitikz}[scale=1.4]\draw
(0,0) to[C, l=\SI{10}{\micro\farad}] (0,2) -- (0,3)
to[R, l=\SI{2.2}{\kilo\ohm}] (4,3) -- (4,2)
to[L, l=\SI{12}{\milli\henry}, i=$i_1$] (4,0) -- (0,0)
(4,2) to[D*, *-*] (2,0) to [D*, -*] (0,2)
to[R, l=\SI{1}{\kilo\ohm}] (2,2) to[cV, v=\SI{0.3}{\kilo\ohm} $i_1$] (4,2)
(2,0) to[I, i=\raisebox{1.2cm}{\SI{1}{\milli\ampere}\hspace{-0.3cm}}, -*] (2,2)
;
\end{circuitikz}
\end{document}
Also, the ne anchor point should be in the vicinity.
\documentclass[a4paper,oneside,titlepage]{article}
\usepackage[utf8]{inputenc}
\usepackage[siunitx]{circuitikz}
\usepackage{tikz}
\usepackage{siunitx}
\begin{document}
\begin{circuitikz}[scale=1.4]\draw
(0,0) to[C, l=\SI{10}{\micro\farad}] (0,2) -- (0,3)
to[R, l=\SI{2.2}{\kilo\ohm}] (4,3) -- (4,2)
to[L, l=\SI{12}{\milli\henry}, i=$i_1$] (4,0) -- (0,0)
(4,2) to[D*, *-*] (2,0) to [D*, -*] (0,2)
to[R, l=\SI{1}{\kilo\ohm}] (2,2) to[cV, v=\SI{0.3}{\kilo\ohm} $i_1$] (4,2)
(2,0) to[I, n=si1, -*] (2,2)
(si1.ne) node[above]{\SI{1}{\milli\ampere}}
;
\end{circuitikz}
\end{document}
Best Answer
Probably better to use a
label
for the node. The custom node types fromcircuitikz
is intended to only generate the shape I believe, not include text.Regarding why
node[ocirc,left]
didn't work, the error message you get gives a hint, in that it sayseast
is not known. Theleft
option setsanchor=east
, but apparently theocirc
node doesn't define any anchor calledeast
, and hence you get an error.