Select Git revision
-
Kathrin Osswald authoredKathrin Osswald authored
To find the state of this project's repository at the time of any of these versions, check out the tags.
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}