Method of Characteristics

In this code we plot the characteristics to the equation
u_t+c(x)u_x=0, u(x,0)=f(x)
and color the characteristics by the value of the function.

Plotting Characteristic Curves

c[x_]:=x*(1-x)*(1+x);

Plot[c[x],{x,-2,2},AxesLabel->{"x","c(x)"},LabelStyle->Directive[Bold,Black, Medium]]

f[x_]:=Exp[-x^2]

Plot[f[x],{x,-10,10},AxesLabel->{"x","f(x)"},LabelStyle->Directive[Bold,Black, Medium],PlotRange->{0,1}]

T=6;
sol=NDSolve[{x'[t]==c[x[t]],x[0]==0},x,{t,0,T}]
plotb=Plot[Evaluate[x[t]]/.sol,{t,0,T},LabelStyle->Directive[Bold,Black, Medium],PlotRange->{-3,3},AxesLabel->{"t","x"},PlotStyle->{ColorData["Rainbow"][f[0]],Thickness[.01]}]

x0=.3;
sol=NDSolve[{x'[t]==c[x[t]],x[0]==x0},x,{t,0,T}]
plota=Plot[Evaluate[x[t]]/.sol,{t,0,T},LabelStyle->Directive[Bold,Black, Medium],PlotRange->{-3,3},AxesLabel->{"t","x"},PlotStyle->{ColorData["Rainbow"][f[x0]],Thickness[.01]}];
plotb=Show[plota,plotb]