Description
A Plot could be internally composed in a harmonious and adaptive way, taking into account the actual bounding box of tick labels and axis titles for example, rather than having you to manually specify margins.
Here I need to enter a guestimate marginLeft:110
to accomodate labels width:
A manual specification of margins is not robust: if unit or data change, or the font family/size used for the axes, overlaps may occur, or unsightly gaps may appear.
Note: ggplot2 and vega-lite automatically handle margins/padding inferred from axis (and legends) bounding boxes.
Plus, an option comparable to labelOverlap
in vega-lite would allow the density of tick labels on a numerical or temporal axis to be managed harmoniously, avoiding any overlap.
PS: Plot is a great library, very intellectually stimulating, and the 21 beautifully written articles in the https://observablehq.com/collection/@observablehq/plot collection should be read by all data scientists!