hug[x_]:=Piecewise[{{-(x-1/2)^2+7/4,x<0},{x+3/2,1>=x≥0},{(x-1/2)^2+9/4,x≥1}}];ptsl[m_,p_,x_]:=m (x-p[[1]])+ p[[2]]//Simplify;

Manipulate[
Show[
Plot[{hug[x],ptsl[hug'[a],{a,hug[a]},x],hug'[x]},{x,-1,2},PlotRange->{{-1,2},{-1,4.5}},
PlotStyle->{Blue,Red,Green},
AspectRatio->5.5/3,PlotPoints->200,ImageSize->200,Ticks->{{-1,0,1,2},{-1,0,1,2,3,4}}
],
Graphics[
{Black,
PointSize[.02],
Point[{a,hug[a]}],
}
]
],
{{a,-1/2},-1,2,.01},
SaveDefinitions->True
]