I'm making the next circuit:
based on the next one
but the resistor has a straight line across. I understand that I am giving the command but I don't understand where.
And by the way, can someone please explain how to work with the nodes, the lines, the cursors, etc? It takes me a lot of work to have done codes like this and perhaps I don't fully grasp if this is working because it's correct or by luck.
\documentclass[tikz,border=3.14]{standalone}
\usepackage{pgf,tikz,pgfplots}
\usepackage[american]{circuitikz}
\usepgfplotslibrary{fillbetween}
\begin{document}
\begin{tikzpicture}
\begin{circuitikz} \draw
(0,0) node[anchor=east]{$v^{-}_{N}$}
to[short, o-*] (1,0)
to[R, l=$R_I$, *-*] (1,2)
%to [R, v=$v_x$, l=$10\ohm$] (3,2)
% to[short] (4,2) to[cV, i=$\frac{\siemens}{5}v_x$, *-*] (4,0)
% to[short] (3,0) to[R, l=$5\ohm$, *-*] (3,2)
% (3,0) -- (1,0)
(1,2) to[short, o-*] (0,2)
node[anchor=east]{$v^{+}_{P}$}
(3,1) node[anchor=east,xshift=3cm]{$v_O$} to[R,l=$R_O$, ] (3.5,1)
to[short,] (2,1) to[cV, i=$\frac{}{}v_x$, o-] (2,-1) -- (2,-1) node [] {}
% to[short, -] (2,-1)
% (2,0) node [-] {}
to node[ground]{}(2,-0.5)
;
% \draw (2,1) -- node[sloped,currarrow,pos=1] {} (3,1) ;
\end{circuitikz}
\end{tikzpicture}
\end{document}
(2,-1) -- (2,-1) node [] {}
).tikzpicture
environments like you do (circuitikz
environment is the same astikzpicture
, and in a standalone you have to use the latter). You will get ll the bounding boxes (picture margins) completely off.(3,1) to[R,l=$R_O$, ] (3.5,1) to[short,] (2,1)
: you ask to put a resistor in a 0.5cm spot (it will not fit, you need at least 1.5cm with default sizes) and then you draw a line through right to left.