# Drawing a tube around a function

I'm looking for a way to draw a tube around a function. I already defined my function (see code below). The distance between tube and function shoulb be equal in each point -> see for example arrows in the picture below.

I'm looking just for the tube outside, the arrows are just for explanation.

\documentclass[11pt]{standalone}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}[scale = 2]
\begin{axis}[
hide axis,
domain=0:100,
samples=100]

\end{axis}
\end{tikzpicture}
\end{document}


• Apparently this must be a curves that has the same slope everywhere as the original curve but not the same curvature – user31729 Jan 27 '16 at 17:47
• Do you know, how to achieve this? – d4rty Jan 27 '16 at 17:52
• You can put \addplot[double, double distance=15pt,domain=0:100, line width=1pt, no marks] {sin(x*5.34)+cos(x)}; before your actual plot (the double key does pretty much what @daleif suggested) – Jake Jan 27 '16 at 18:39
• @Jake sorry, I took your answer. Hadn't seen in. I was looking in my own questions I had asked. Sorry – Arne Timperman Jan 27 '16 at 18:55
• @Arne: No worries! – Jake Jan 27 '16 at 18:58

Here you are...

\documentclass[11pt]{standalone}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[scale = 2]
\begin{axis}[
hide axis,
domain=0:100,
samples=100]

\addplot[BrickRed,domain=0:100,ultra  thick, double=brown!40,double   distance=10pt, no marks] {sin(x*5.34)+cos(x)};