Plot.plot({
y:{grid:true,
label:"Life Expectancy (years)"},
marks: [
Plot.ruleY([0]),
Plot.lineY(slope_chart_data, {x: "year"
, y: "le_birth_both"
, z:"country"
, stroke: d => d.country === country_select ? 'red' : d.country === country_select_compare ? 'blue' : 'lightgray'
, strokeOpacity: d => (d.country === country_select || d.country === country_select_compare) ? 1 : 0.1})
],
caption: "How the life expectancy has changed for " + sex_value + " over time for "+ country_select + "(red) and " + country_select_compare + " (blue)"
})