f[x_] := 6 E^-x Sin[2*Pi*x^2];
g[x_] := Sin[2*x*10];
Plot[{f[x], f[x]}, {x, 0, 2},
ColorFunction -> Function[{x, y}, Hue[g@x]]ColorData["TemperatureMap"][g@x]],
ColorFunctionScaling -> True, Filling -> {{1 -> Bottom}, {2 -> Top}},
Epilog ->
Plot[f[x], {x, 0, 2},
PlotStyle -> {AbsoluteThickness[2], White}][[1]]]
f[x_] := 6 E^-x Sin[2*Pi*x^2];
g[x_] := Sin[2*x*10];
data = Table[{x, f[x]}, {x, 0, 2, .1}];
ListPlot[{data, data}, Joined -> True,
ColorFunction -> Function[{x, y}, Hue[g@x]]ColorData["TemperatureMap"][g@x]],
ColorFunctionScaling -> True, Filling -> {{1 -> Bottom}, {2 -> Top}},
Epilog -> ListPlot[data, PlotStyle -> White, Joined -> True][[1]]]
ListPlot
+ Joined -> False