plot
plot copied to clipboard
Plot with inset, axis marks and two bands has wrong auto height
If a plot specifies an inset as well as axis marks, then the resulting height causes y labels to overlap if the data only produces two bands:
Plot.plot({
inset: 20,
marks: [
Plot.axisX({anchor: "top"}),
Plot.axisX({anchor: "bottom"}),
Plot.dot("AB", {y: d => d, x: 0})
]
})
Screenshot:
I don’t think the auto height accounts for insets. Not sure if we can do that, so this might be intended behavior.
@mbostock Should I turn the issue into a feature request to consider insets when calculating the height?