Edit and compile if you like:
% Author: Izaak Neutelings (November, 2018)% page 8 https://archive.org/details/StaticAndDynamicElectricity% https://tex.stackexchange.com/questions/56353/extract-x-y-coordinate-of-an-arbitrary-point-on-curve-in-tikz% https://tex.stackexchange.com/questions/412899/tikz-calculate-and-store-the-euclidian-distance-between-two-coordinates\documentclass[border=3pt,tikz]{standalone}\usepackage{amsmath} % for \dfrac\usepackage{physics}\usepackage{tikz,pgfplots}\usetikzlibrary{angles,quotes} % for pic (angle labels)\usetikzlibrary{decorations.markings}\usetikzlibrary{positioning,calc}\usetikzlibrary{shapes,intersections} % for path name\pgfplotsset{compat=1.13}\tikzset{>=latex} % for LaTeX arrow head\usepackage{xcolor}\colorlet{Ecol}{orange!90!black}\colorlet{EcolFL}{orange!80!black}\colorlet{veccol}{green!45!black}\colorlet{EFcol}{red!60!black}\colorlet{pluscol}{red!60!black}\colorlet{minuscol}{blue!60!black}\tikzstyle{charged}=[top color=blue!20,bottom color=blue!40,middle color=blue!30,shading angle=10]\tikzstyle{darkcharged}=[very thin,top color=blue!60,bottom color=blue!80,shading angle=10]\tikzstyle{gauss surf}=[blue!90!black,top color=blue!2,bottom color=blue!80!black!70,shading angle=5,fill opacity=0.1]\tikzstyle{gauss line}=[blue!90!black]\tikzstyle{vector}=[->,thick,veccol]\tikzstyle{EField}=[->,thick,Ecol]\tikzset{EFieldLine/.style={thick,EcolFL,decoration={markings,mark=at position #1 with {\arrow{latex}}},postaction={decorate}},EFieldLine/.default=0.5}\tikzstyle{measure}=[fill=white,midway,outer sep=2]\tikzstyle{metal}=[top color=black!10,bottom color=black!20,middle color=black!5,shading angle=35]\def\L{2.2}\def\H{2.2}\def\offset{2.0}\def\W{0.30}\def\Nx{5}\def\Ny{5}
Click to download: electric_field_body.tex • electric_field_body.pdf
Open in Overleaf: electric_field_body.tex