matrix = {
const svg = d3.create('svg')
.attr('width', barleyWidth)
.attr('height', barleyHeight);
const matrix = svg.append('g');
matrix.selectAll('circle')
.data(varietySiteYields)
.join('circle')
.attr('cx', d => xBarley(d.variety))
.attr('cy', d => yBarley(d.site))
.attr('r', d => radius(d.yield))
.attr('fill', 'steelblue');
svg.append('g')
.attr("transform", `translate(0, ${barleyHeight - marginsBarley.bottom})`)
.call(xAxisBarley)
.call(g => g.select(".domain").remove())
.append("text")
.attr("x", barleyWidth / 2)
.attr("y", 40)
.attr("fill", "black")
.attr("text-anchor", "middle")
.attr('font-weight', 'bold')
.text("Variety");
svg.append('g')
.attr("transform", `translate(${marginsBarley.left})`)
.call(yAxisBarley)
.call(g => g.select(".domain").remove())
.append("text")
.attr("x", -marginsBarley.left)
.attr("y", barleyHeight / 2)
.attr("fill", "black")
.attr("dominant-baseline", "middle")
.attr("text-anchor", "start")
.attr('font-weight', 'bold')
.text("Site")
svg.append("g").call(sizeLegend);
return svg.node();
}