LaTeX-PGF-Diagram2D

 view release on metacpan or  search on metacpan

doc-src/diagram-en.tex  view on Meta::CPAN

\section{Tutorial}
\subsection[Function]{Example 1: Function plot}
\figimage{diagf003}{Example circuit}

In an electronic circuit as seen in figure~\vref{fig:diagf003}
we have a voltage source \(U_{\text{q}}=1\,\text{V}\) with an internal resistance
\(R_{i}=4\,\Omega\). For a variable load resistor
\(0\leq R_{\text{L}}\leq 10\,\Omega\) we want to print the current
\(I\) for each \(R_{\text{L}}\) value.

The formula
\begin{align*}I&=\frac{U_{\text{q}}}{R_{\text{L}}+R_{\text{i}}}\end{align*}
can be used to calculate \(I\).

For a first overview we use GnuPlot:
\begin{lstlisting}[language=GnuPlot]
Uq=1.0
Ri=4.0
set xrange [0:10.0]
plot Uq/(Ri+x) title "Strom"
\end{lstlisting}



( run in 0.244 second using v1.01-cache-2.11-cpan-26ccb49234f )