I need to draw a shifted plot from a data table (or a external file) without edit table coordinates. Using the shift={(x,y)}
option works but x
and y
are not related to the axis coordinates s
and f
. Any advice?
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin=0, xmax=1,
ymin=0, ymax=360,
xlabel=$s$,
ylabel=$f(s)$
]
\addplot[shift={(0.0,0.0)}] table[header=true,x=s,y=f] {
s f
0.0 75.9638
0.380665 75.9638
0.380665 206.565
0.58711 206.565
0.58711 243.435
0.793555 243.435
0.793555 333.435
1.0 333.435
};
\end{axis}
\end{tikzpicture}
\end{document}