I am solving a heat equation in following example:
heqn = D[u[x, t], t] == D[u[x, t], {x, 2}];
ic = u[x, 0] == Exp[-x^2];
sol = DSolveValue[{heqn, ic}, u[x, t], {x, t}]
I'd like to manipulate the solution by plotting it in space for a given time. However a naive way of implementing it gives an empty plot:
Manipulate[
Plot[sol, {x, -2, 2}, PlotRange -> All],
{t, 0, 1}
]
What is a proper way of using Manipulate in such a case?