Advertisement
Guest User

Untitled

a guest
May 24th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 1.05 KB | None | 0 0
  1. \documentclass{standalone}
  2.  
  3. \usepackage {tikz}
  4. \usepackage{pgfplots}
  5. \usetikzlibrary{pgfplots.groupplots}
  6.  
  7. \pgfmathdeclarefunction{gauss}{2}{%
  8.   \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
  9. }
  10.  
  11. \begin{document}
  12. \begin{tikzpicture}
  13.    \begin{groupplot}[
  14.         group style={group name=gaussians, group size=1 by 3, %quantas linhas?
  15.             xlabels at=edge bottom, xticklabels at=edge bottom, ylabels at=edge left, yticklabels at=edge left, %configuracoes sobre labels
  16.             vertical sep=0pt},
  17.         footnotesize, xlabel=Nome do eixo?, % tamanho fonte e nome eixo
  18.         width=8cm, height=3cm, xmin=-3, xmax=3, ymin=0, ymax=1, % medidas do grafico
  19.         xtick={-3, -2, ..., 3}, ytick={0}, % ticks
  20.         tickpos=left, ytick align=outside,xtick align=outside] % configuracao das marquinha
  21. \nextgroupplot
  22. \addplot[draw=blue, smooth] {gauss(0,0.5)};
  23. \nextgroupplot
  24. \addplot[draw=red, smooth] {gauss(1,0.75)};
  25. \nextgroupplot
  26. \addplot[draw=red, smooth] {gauss(-1, 0.4)};
  27. \end{groupplot}
  28. \end{tikzpicture}
  29.  
  30. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement