\begin{tikzpicture}[scale=1] \pgfmathsetmacro{\tkW}{8} % Total width \pgfmathsetmacro{\tkH}{5} % Total height % left \pgfmathsetmacro{\tkLx}{0} % Start \pgfmathsetmacro{\tkLW}{2} % Right width \pgfmathsetmacro{\tkLyshift}{0.0} % y-shift \pgfmathsetmacro{\tkLBendH}{0} % Band bending height \pgfmathsetmacro{\tkLBendW}{0} % Band bending width \pgfmathsetmacro{\tkLEV}{4.0+\tkLyshift}% Vacuum energy \pgfmathsetmacro{\tkLEf}{2.5+\tkLyshift}% Fermi level energy % right \pgfmathsetmacro{\tkRx}{4} % Left start \pgfmathsetmacro{\tkRW}{\tkW-\tkRx} % Left width \pgfmathsetmacro{\tkRyshift}{0} % y-shift \pgfmathsetmacro{\tkRBendH}{0.5} % Band bending height \pgfmathsetmacro{\tkRBendW}{\tkRW/4} % Band bending width \pgfmathsetmacro{\tkREv}{0.7+\tkRyshift}% Valence band energy \pgfmathsetmacro{\tkREc}{2.5+\tkRyshift}% Conduction band energy \pgfmathsetmacro{\tkREV}{4.0+\tkRyshift}% Vacuum energy \pgfmathsetmacro{\tkREf}{2.0+\tkRyshift}% Fermi level energy % materials \draw[sc metal] (0,0) rectangle (\tkLW,\tkH); \node at (\tkLW/2,\tkH-0.2) {\GT{metal}}; \path[sc n type] (\tkRx,0) rectangle (\tkW,\tkH); \node at (\tkRx+\tkRW/2,\tkH-0.2) {\GT{n-type}}; \drawAxes % right bands \path[sc occupied] (\tkRx, 0) -- \rightBand{}{\tkREv} -- (\tkW, 0) -- cycle; \draw[sc band con] \rightBand{$\Econd$}{\tkREc}; \draw[sc band val] \rightBand{$\Evalence$}{\tkREv}; \draw[sc band vac] (0,\tkLEV) -- \rightBand{$\Evac$}{\tkREV}; \draw[sc fermi level] \rightBand{$\Efermi$}{\tkREf}; % left bands \path[sc occupied] (0,0) rectangle (\tkLW,\tkLEf); \draw[sc fermi level] \leftBand{$\Efermi$}{\tkLEf}; % work functions \drawDArrow{\tkLW/2}{\tkLEf}{\tkLEV}{$e\Phi_\txM$} \drawDArrow{\tkRx+\tkRW*2/3}{\tkREf}{\tkREV}{$e\Phi_\txS$} \drawDArrow{\tkRx+\tkRW*1/3}{\tkREc}{\tkREV}{$e\chi$} \end{tikzpicture}