function t_pic(t1, t2, dof, w) {
let xmin = -5.2;
let xmax = 5.2;
let plot = plotter({
xDomain: [xmin, xmax],
yDomain: [0.5, -0.05],
grid: false,
width: w,
height: w / 2,
xLabel: '',
yLabel: '',
yTickCount: 5,
xTickCount: 5
});
let a = d3.max([t1, xmin]);
let b = d3.min([t2, xmax]);
let dx = 0.05;
let pts = [{ x: a, y: 0 }]
.concat(
d3.range(a, b, dx).map(x => ({ x: x, y: jstat.studentt.pdf(x, dof) }))
)
.concat([{ x: b, y: jstat.studentt.pdf(b, dof) }, { x: b, y: 0 }]);
plot.polygon(pts, { fill: 'lightblue', width: 0.2 });
plot.func(x => jstat.studentt.pdf(x, dof), {
stroke: 'black',
width: 2
});
return plot.node;
}