\documentclass[border=4pt]{standalone}
\usepackage{ga}
\input{../fm.tikz}
\begin{document}
\begin{circuitikz}[font=\small]
\draw (0,0) to[american voltage source, l=$V_\mathrm{in}$, invert] (0,2.6);
\draw (0,2.6) to[R, l=$R_1$] (2.4,2.6) node[circ]{} to[short, -o] (3.6,2.6);
\draw (2.4,2.6) to[empty diode, l_=$D_1$] (2.4,1.3) to[battery1, l_=$V_\mathrm{B}$] (2.4,0);
\draw (0,0) -- (3.6,0) node[ocirc]{}; \node at (3.6,2.15) {$+$}; \node at (3.85,1.3) {$V_\mathrm{out}$}; \node at (3.6,0.45) {$-$};
\begin{scope}[xshift=6.6cm, yshift=1.2cm]\axes{-1.8}{2.8}{-1.4}{1.8}{$V_\mathrm{in}$}{$V_\mathrm{out}$}\draw[cv] (-1.4,-1.4) -- (0.8,0.8) -- (2.6,0.8); \xt{0.8}{$V_\mathrm{B}$} \yt{0.8}{$V_\mathrm{B}$} \draw (-0.9,-0.9) -- (-0.6,-0.9) -- (-0.6,-0.6); \node[right, font=\footnotesize] at (-0.6,-0.85) {1};\end{scope}
\end{circuitikz}
\end{document}
