Page MenuHomec4science

hysteresis.tex
No OneTemporary

File Metadata

Created
Sun, Dec 22, 14:16

hysteresis.tex

\begin{tikzpicture}
\pgfplotsset
{
%scale only axis,
%scaled x ticks = base 10:2,
%height = 18cm,
width = 10cm,
xlabel={$I$ [\si{\ampere}]},
xmin = -6.2, xmax = 6.2,
%title = {Aluminium},
legend style =
{
at = {(0.05, 0.95)},
anchor = north west
},
%cycle list name = color,
grid style = dashed,
ymajorgrids = true
}
\begin{axis}
[
ylabel={$B$ [\si{\tesla}]},
ymin = -0.5, ymax = 0.5
]
\pgfplotstableread{rawdata/hysteresis.dat}\datafile
\addplot+
[
color = blue,
mark = *,
mark options = {
draw = black,
fill = blue
},
only marks,
error bars/.cd,
x dir=both,
y dir=both,
x explicit,
y explicit
]
table [x = I, y = B, x error = errI, y error = errB] {\datafile};
\addlegendentry{Raw data}
\addplot
[
mark = none,
color = red,
domain = -4.2:4.2
] {0.12344821038132958 * x - 0.0108738915788438};
\addlegendentry{Linear fit}
\end{axis}
\end{tikzpicture}

Event Timeline