I would like to apply a ColorFunction across the width of the line so that the line remains bright white at the center and fades to background color shortly thereafter at the edges creating the look of an oscilloscope trace (or at least, that's what I think it will result in). (something similar to this)
Plot[x, {x, -1, 1}
, PlotStyle -> {Thickness[0.04], White}
, Background -> Darker@Cyan
]
From what I understand, the ColorFunction works along the length of the line as follows;
Plot[x, {x, -1, 1}
, PlotStyle -> {Thickness[0.04], White}
, Background -> Darker@Cyan
, ColorFunction -> Hue
]
Thanks in advance for your replies and suggestions.








ColorFunction -> (Opacity[#1, White] &)and removing theWhitefrom thePlotStyle? – MarcoB Jan 07 '22 at 21:12Plot[Sin[x], {x, -4, 4}, PlotStyle -> {Thickness[0.04]}, ColorFunction -> (Opacity[#1, White] &), Background -> Darker@Cyan]results in a gradient in the x-direction shown here. – Syed Jan 07 '22 at 21:17ColorFunction -> (Blend[{Darker@Cyan, White, Darker@Cyan}, #] &)? – kglr Jan 07 '22 at 21:27ParametricPlot[{x, 1 - t + x}, {x, -1, 1}, {t, -.1, .1}, BoundaryStyle -> None, Background -> Darker@Cyan, ColorFunction -> (Blend[{Darker@Cyan, White, Darker@Cyan}, (#4 + .1)/.2] &), ColorFunctionScaling -> False, AspectRatio -> 1/2]? – kglr Jan 07 '22 at 21:39Plot? – Syed Jan 07 '22 at 21:44