Skip to content
Snippets Groups Projects
Select Git revision
  • 8e21b30fc6d788436b4c2bc424deee9c40cf3d11
  • main default protected
2 results

Readme.md

Blame
  • examplePlot.tex 1.14 KiB
    \documentclass{HsH-standalone}
    
    
    \usepackage{siunitx} % SI units
    \usepackage{pgfplots} % plots und bilder, includes tikz and graphix
    \usepackage{pgfplotstable} % fo ruse of tables, csv files are tables
    
    \begin{document} %----------------------Content---------------------------------------------------%
    
    \begin{tikzpicture}
    	\begin{axis}[MyPlots] % use custom styling
    		\addplot[FM1,domain=-1:1, name path=A]{x^2};
    		\addplot[FM2,mark=none,domain=-1:1, name path=B]{0.5*x^2-1};
    		\addplot[pattern color=gray!40, pattern=dots] fill between[of=A and B];
    	\end{axis}
    \end{tikzpicture}
    
    \begin{tikzpicture}
    	\pgfplotstableread{../../data/csv/bsp.csv}\data % read file into macro
    	\begin{axis}[
    			MyPlots, % custom styling
    			xlabel=X Achse,
    			ylabel=$\percent$,
    		]
    		\addplot[FM1,errBars] table [x=A,y=C,y error=D] {\data};
    			\addlegendentry{Messdaten}
    		\addplot[FM2,smooth] table [x=A,y=C] {\data};
    			\addlegendentry{theroretische Werte}
    		\addplot[FM4] table [x=A,y={create col/linear regression={y=C}}] {\data};
    			\addlegendentry{lineariesiert zu: $y=\num\pgfplotstableregressiona*x+\num\pgfplotstableregressionb$}
    	\end{axis}
    \end{tikzpicture}
    
    \end{document}