Plot.plot({
width: 500,
height: 420,
inset: 45,
color: {
nice: true,
type: "linear",
scheme: "BuYlRd",
legend: true
},
projection: ternary.projection,
marks: [
Plot[show_dots ? "dot" : "raster"](
stone,
ternary.normalize({
a: "limestone",
b: "water",
c: "air",
pixelSize: 0.5,
strokeWidth: 0.5,
thresholds: 40,
interpolate: "random-walk",
blur: 10,
fill: "permittivity",
clip: "sphere"
})
),
Plot.contour(
stone,
ternary.normalize({
a: "limestone",
b: "water",
c: "air",
pixelSize: 3,
blur: 8,
strokeWidth: 0.5,
thresholds: 10,
interpolate: "random-walk",
value: "permittivity",
clip: "sphere"
})
),
Plot.sphere(),
ternary.tickLabels(),
ternary.labels(["limestone", "water", "air"], { fontWeight: "bold" })
]
})