Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{standalone}
- \usepackage {tikz}
- \usepackage{pgfplots}
- \usetikzlibrary{pgfplots.groupplots}
- \pgfmathdeclarefunction{gauss}{2}{%
- \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
- }
- \begin{document}
- \begin{tikzpicture}
- \begin{groupplot}[
- group style={group name=gaussians, group size=1 by 3, %quantas linhas?
- xlabels at=edge bottom, xticklabels at=edge bottom, ylabels at=edge left, yticklabels at=edge left, %configuracoes sobre labels
- vertical sep=0pt},
- footnotesize, xlabel=Nome do eixo?, % tamanho fonte e nome eixo
- width=8cm, height=3cm, xmin=-3, xmax=3, ymin=0, ymax=1, % medidas do grafico
- xtick={-3, -2, ..., 3}, ytick={0}, % ticks
- tickpos=left, ytick align=outside,xtick align=outside] % configuracao das marquinha
- \nextgroupplot
- \addplot[draw=blue, smooth] {gauss(0,0.5)};
- \nextgroupplot
- \addplot[draw=red, smooth] {gauss(1,0.75)};
- \nextgroupplot
- \addplot[draw=red, smooth] {gauss(-1, 0.4)};
- \end{groupplot}
- \end{tikzpicture}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement