tikz - how to fading path like this sample with tikz

see this image, how can tike fading path the same?

To give more details:

1. If we just feed color top/middle/bottom just like below code:

\addplot[fill opacity=1,top color=white,bottom color=white,middle color=black] fill between [of=A and B];

The result picture is:

1. If we just feed color left/middle/right just like below code:

\addplot[fill opacity=1,left color=white,right color=white,middle color=black] fill between [of=A and B];

The result picture is:

This case more like the reference duplicate one.

But the original picture is fading like following the curve's direction and color fading from center to border. so it's very special.

Schrödinger's cat's answer just do a work around to draw multiple times fading and shrink it one by one, then it just simulate that effect. it's slow for sure since divided the drawing into a loop. but that's what we want exactly.

• Does this answer your question? Stroke with variable thickness – C.F.G Apr 1 at 18:21
• @C.F.G Sounds like a little different, that question is fading following the path, this question is around the path. – lucky1928 Apr 1 at 18:24

If the question is whether it is possible to fabricate a plot that looks similar to the one you show, the answer is affirmative.

\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{fillbetween}
\begin{document}
\begin{tikzpicture}
\begin{axis}[declare function={f(\x,\y)=tanh((1840+\y-\x)/200)*\x/1.8;},
scaled y ticks=false,
xmin=0,xmax=1800,ymin=0,ymax=1100,
yticklabel={\pgfmathparse{\tick/1000}\pgfmathprintnumber\pgfmathresult}
]
{f(x,0)};
\pgfplotsinvokeforeach{1,...,20}{