ich schreibe gerade an meiner Abschlussarbeit und arbeite mich gerade in Latex und auch Tikz ein. Bisher hat alles gut geklappt. Nur bin ich gerade an diesem Tikz Plot am verzweifeln. Je nach dem wie ich die samplerate anpasse verschiebt sich das Bild.
Wenn ich auch noch einen 2.ten Plot drüber lege verschiebt sich das Bild noch weiter. Vielen Dank euch schon mal für die Hilfe...
\documentclass[draft=false,paper=a4,twoside=false,fontsize=11pt,headsepline,BCOR10mm,DIV11]{scrbook} \usepackage[ngerman,english]{babel} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage{amsmath,amsfonts,amssymb} \usepackage{booktabs,array,subfigure,wrapfig,graphicx,tikz,pgfplots} \usepackage{libertine,pifont,microtype,textcomp,setspace,makeidx,listings,mdwlist} \usepackage[german,refpage]{nomencl} \usepackage[style=numeric,backend=biber,maxcitenames=2,natbib=true \usepackage[ngerman,colorlinks=true,colorlinks=true, breaklinks=true, citecolor=black, linkcolor=black, menucolor=black, urlcolor=black]{hyperref} \usepackage{soul} \usepackage[babel,german=guillemets]{csquotes} \usepackage[europeanresistors]{circuitikz} \usetikzlibrary{petri,plotmarks} \begin{document} \pgfmathdeclarefunction{normal}{3}{% \pgfmathparse{1/(#3*sqrt(2*pi))*exp(-((#1-#2)^2)/(2*#3^2))} } \begin{figure}%\centering \begin{tikzpicture} \begin{axis}[ no markers, domain=0:6, samples=18, axis lines=left, xlabel=$x$,ylabel=$y$, xmax=6.4, every axis y label/.style={at=(current axis.above origin),anchor=south}, every axis x label/.style={at=(current axis.right of origin),anchor=west}, height=5cm,width=12cm,xtick=\empty,ytick=\empty, enlargelimits=false, clip=false, axis on top, grid = major ] \addplot [smooth,very thick,cyan!50!black,samples=14] {normal(x,3,1)}; \pgfmathsetmacro\valueA{normal(2,3,1)} \pgfmathsetmacro\valueB{normal(3,3,1)} \draw [gray] (axis cs:2,0.005) -- (axis cs:2,\valueA) (axis cs:4,0.005) -- (axis cs:4,\valueA) (axis cs:3,0.005) -- (axis cs:3,\valueB); \draw [yshift=1.4cm, latex-latex](axis cs:2,0) -- node [fill=white] {$0.683$} (axis cs:4,0); \node[below] at (axis cs:2,0) {$\mu - \sigma$}; \node[below] at (axis cs:3,0) {$\mu$}; \node[below] at (axis cs:4,0) {$\mu + \sigma$}; \end{axis} \end{tikzpicture} \caption[Dichtefunktion der Gaußschen Normalverteilung]{Dichtefunktion der Gaußschen Normalverteilung mit dem Mittelwert $\mu$ und der Standardabweichung $\sigma$} \end{figure} \end{document}