Hi all,
First-time post, so please feel free to provide feedback on my formatting.
When doing a simple plot, I can pass ticks into the X or Y axis to limit the number of tick marks likes this:
Plot.plot({
width: width,
y: {
grid: true,
label: "↑ Count"
},
color: {
legend: true,
},
x: {
ticks: 18,
},
marks: [
Plot.line(groupedByType, {
x: "1",
y: "2",
z: "0",
})
]
})
However, when I’m using GroupX, this is ignored
Plot.plot({
width: width,
color: {
legend: true
},
y: {
grid: true,
label: "Number of Funds"
},
x: {
label: "Year",
ticks: 10,
},
marks: [
Plot.barY(
allFunds,
Plot.groupX(
{ y: "count" },
{
x: (d) => new Date(d.establishedDate).getUTCFullYear(),
fill: "Fund Type",
},
)
),
Plot.ruleY([0])
]
})
This is causing my labels to run into each other as shown here:
I’m using private data so I can’t share a notebook, but I could probably spend some time anonymizing if it would be helpful.
Thanks in advance.