Latex course for IAS IEEE branch
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
978 B

  1. \documentclass{article}
  2. \usepackage{tikz}
  3. \usepackage{pgfplots}
  4. \pgfplotsset{compat=1.5.1}
  5. \begin{document}
  6. %1 latex as calculator
  7. \begin{tikzpicture}
  8. \begin{axis}[
  9. xlabel=tiempo $t$,
  10. ylabel=$f(t)$, mark repeat=2]
  11. \addplot{x^2+5};
  12. \addplot{x+6};
  13. \end{axis}
  14. \end{tikzpicture}
  15. %2 coordinates
  16. \begin{tikzpicture}
  17. \begin{axis}[
  18. xlabel=$x$,
  19. ylabel=$f(x)$]
  20. \addplot[color=black, mark=diamond, mark size=4pt] coordinates{
  21. (0,0)
  22. (1,4)
  23. (2,9)
  24. (3,-3)
  25. };
  26. \addlegendentry{pH}
  27. \end{axis}
  28. \end{tikzpicture}
  29. %3 CSV files:
  30. \begin{tikzpicture}
  31. \begin{semilogyaxis}[
  32. legend pos=north west,
  33. %ylabel style={rotate =-90},
  34. xlabel=timpo en ($s$),
  35. ylabel=Voltaje ($mV$)]
  36. \addplot[color=black,dashed, mark=o, line width=3pt] table[x=tiempo, y=voltaje, col sep=comma]{data.csv};
  37. \addlegendentry{voltaje}
  38. \addplot table[x=tiempo, y=corriente, col sep=comma]{data.csv};
  39. \addlegendentry{corriente}
  40. \end{semilogyaxis}
  41. \end{tikzpicture}
  42. \end{document}