Plot.plot({caption:`Portfolio expected return as a function of the weight of X in the portfolio`,x: {label:"Weight of asset X in the portfolio",zero:true},y: {label:"Portfolio expected return",domain: [0,0.3]},marks: [ Plot.ruleY([0]), Plot.lineY(portfolios, {x:"w_x",y:"er_p",stroke:"orange"}), ]})
Plot.plot({caption:`Portfolio standard deviation as a function of the weight of X in the portfolio`,x: {label:"Weight of asset X in the portfolio",zero:true},y: {label:"Portfolio standard deviation",domain: [0,0.6]},marks: [ Plot.ruleY([0]), Plot.lineY(portfolios, {x:"w_x",y:"sd_p",stroke:"green"}), ]})