Plot of electric voltage along circuit. Also see this 3D figure, and for more related figure, see the Electric engineering category.
Simple circuit with battery/EMF and single resistor.
Edit and compile if you like:
% Author: Izaak Neutelings (December 2021)\documentclass[border=3pt,tikz]{standalone}\usepackage{pgfplots}\usepackage[siunitx]{circuitikz}\usepackage[outline]{contour} % glow around text\usetikzlibrary{arrows}\usetikzlibrary{decorations.markings}\tikzset{>=latex} % for LaTeX arrow head\usepackage{xcolor}\contourlength{1.5pt}\colorlet{Icol}{blue!60!black}\colorlet{Ccol}{orange!90!black}\colorlet{Rcol}{green!50!black}\colorlet{myred}{red!90!black}\newcommand\EMF{\mathcal{E}}\tikzstyle{EMF}=[battery1,l=$\EMF$,thin]\tikzstyle{internal R}=[R,color=Rcol,Rcol,l=$r$,bipoles/length=25pt]\tikzstyle{thick R}=[R,color=Rcol,thick,Rcol,l=$R$,bipoles/length=35pt]\tikzstyle{small <->}=[{Latex[length=4,width=3]}-{Latex[length=4,width=3]},thick]\def\tick#1#2{\draw[thick] (#1) ++ (#2:0.1) --++ (#2:-0.2)}\begin{document}% RESISTOR with EMF\begin{tikzpicture}[scale=0.9]\def\Vmax{2.0}% FILL AREA\fill[Icol!15] (0.09,-1.7) rectangle (0.90,\Vmax+0.2);\fill[Rcol!15] (1.70,-1.5) rectangle (3.30,\Vmax+0.2);% AXIS\begin{scope}[shift={(-0.5,0)}]\draw[->,thick](-0.3,0) -- (4.9,0);\draw[->,thick]
Click to download: electric_circuit_voltage_plots.tex • electric_circuit_voltage_plots.pdf
Open in Overleaf: electric_circuit_voltage_plots.tex