Plot.plot({
grid: true,
inset: 10,
width: width*1.5,
height: width*0.5,
marginLeft: 40,
marginBottom:50,
y:{
label:' Nitrates in Million Tons',
transform: d => d / 1000000
},
x:{
tickRotate:90,
ticks: 20
},
facet: {
data: NO3,
x: "animal",
label:null,
},
fx:{
padding:0.04,
tickFormat: emoji
},
marks: [
Plot.frame(),
Plot.text(NO3,{x: "year", y: "no3",title: d => `${d.no3} tons`,text: d => '💩'})
],
style: {
backgroundColor: "F4D06F",
color: "#000",
fontFamily: "system-ui",
fontSize: 14,
},
caption:"New Zealand Nitrate levels from stock between 1990 and 2017"
})