\documentclass[border=4pt]{standalone}
\usepackage{ga}
\input{../ee1.tikz}
\begin{document}
\begin{circuitikz}
% n-type bar: a resistor
\draw[line width=1.1pt] (0.6,2.4) rectangle (2.4,3);
\node at (1.5,2.7) {n};
\draw (0.6,2.7) -- (0,2.7) to[short, i<=$I_x$] (0,1.2) -- (0.9,1.2) to[american voltage source, hsrc, l_=$V_x$] (2.1,1.2) -- (3,1.2) -- (3,2.7) -- (2.4,2.7);
\node[font=\small] at (1.5,0.2) {$I_x = V_x/R$};

% pn junction
\begin{scope}[xshift=6.2cm]
\draw[line width=1.1pt] (0.6,2.4) rectangle (1.5,3) (1.5,2.4) rectangle (2.4,3);
\node at (1.05,2.7) {p}; \node at (1.95,2.7) {n};
\draw (0.6,2.7) -- (0,2.7) to[short, i<=$I_x$] (0,1.2) -- (0.9,1.2) to[american voltage source, hsrc, l_=$V_x$] (2.1,1.2) -- (3,1.2) -- (3,2.7) -- (2.4,2.7);

\end{scope}
\begin{axis}[sketch, at={(-0.6cm,-3.6cm)}, width=4.6cm, height=3.4cm, xmin=-1, xmax=1, ymin=-1, ymax=1, xlabel={$V_x$}, ylabel={$I_x$}]
  \addplot[domain=-0.95:0.95] {0.8*x};
  \draw[dim] (axis cs:0.45,0.36) -- (axis cs:0.75,0.36) -- (axis cs:0.75,0.6);
  \node[font=\small, anchor=west] at (axis cs:0.78,0.45) {$1/R$};
\end{axis}
\begin{axis}[sketch, at={(5.6cm,-3.6cm)}, width=4.6cm, height=3.4cm, xmin=-1, xmax=1, ymin=-0.3, ymax=1.3, xlabel={$V_x$}, ylabel={$I_x$}]
  \addplot[domain=-0.95:0.95, samples=80] {0.0012*(exp(x/0.13)-1)};
\end{axis}
\draw[<->, gagray] (3.6,-1.6) -- (5.3,-1.2) node[midway, above, font=\small, sloped]{compare};
\end{circuitikz}
\end{document}
