\documentclass{article}
|
|
\usepackage{tikz}
|
|
\usepackage{pgfplots}
|
|
\pgfplotsset{compat=1.5.1}
|
|
|
|
\begin{document}
|
|
%1 latex as calculator
|
|
\begin{tikzpicture}
|
|
\begin{axis}[
|
|
xlabel=tiempo $t$,
|
|
ylabel=$f(t)$, mark repeat=2]
|
|
\addplot{x^2+5};
|
|
\addplot{x+6};
|
|
\end{axis}
|
|
|
|
\end{tikzpicture}
|
|
|
|
%2 coordinates
|
|
\begin{tikzpicture}
|
|
\begin{axis}[
|
|
xlabel=$x$,
|
|
ylabel=$f(x)$]
|
|
\addplot[color=black, mark=diamond, mark size=4pt] coordinates{
|
|
(0,0)
|
|
(1,4)
|
|
(2,9)
|
|
(3,-3)
|
|
};
|
|
\addlegendentry{pH}
|
|
\end{axis}
|
|
|
|
\end{tikzpicture}
|
|
|
|
%3 CSV files:
|
|
\begin{tikzpicture}
|
|
\begin{semilogyaxis}[
|
|
legend pos=north west,
|
|
%ylabel style={rotate =-90},
|
|
xlabel=timpo en ($s$),
|
|
ylabel=Voltaje ($mV$)]
|
|
\addplot[color=black,dashed, mark=o, line width=3pt] table[x=tiempo, y=voltaje, col sep=comma]{data.csv};
|
|
\addlegendentry{voltaje}
|
|
\addplot table[x=tiempo, y=corriente, col sep=comma]{data.csv};
|
|
\addlegendentry{corriente}
|
|
\end{semilogyaxis}
|
|
|
|
\end{tikzpicture}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\end{document}
|
|
|
|
|
|
|