function vegaRadialLine(theta, {
height = 200,
width = 300,
color = "red",
label = "",
} = {}) {
return {
title: label,
data: { values: [ { theta: PI/2 - theta, theta2: (PI/2 - theta) + 0.05, color, label, r: 1, r2: -1 } ] },
height,
width,
mark: {
type: "arc",
filled: true,
color,
},
encoding: {
radius: { field: "r", type: "quantitative", title: "Radius", "scale": {"domain": [0, 1]} },
radius2: { field: "r2", type: "quantitative", title: "Radius", "scale": {"domain": [0, 1]} },
theta: { field: "theta", type: "quantitative", title: "Theta", "scale": {"domain": [0, 2*PI]} },
theta2: { field: "theta2", type: "quantitative" },
color: { field: "label" }
}
}
}