I created a plot that I like except that the dot sizes are way to small. I want to add text to some dots that are larger (d.count>20
). The data ranges from a count of 1 - 479. Note:479 is an outlier, and most counts are well below 50. I’ve tried adding a constant, adding d.count
raised to an exponent, and a few random other tactics; however, they all basically result in dots that remain around the same overall size as shown below, or they all become near homogenous in size. I would like to be able to change the chart height to be larger. Maybe around 500px compared to the existing 250px, but this squashes the dots down farther.
Clearly the text doesn’t look good in the dots as-is, so what are some tips that can help to potentially help this situation?
Code
Plot.plot({
height: 250,
width: 1100,
marks: [
Plot.dot(
designation_date_data_AQ,
Plot.dodgeY({
x: "Designation Date",
r: (d) => d.count,
padding: 7,
fill: "black"
})
),
Plot.text(
designation_date_data_AQ,
Plot.dodgeY({
filter: (d) => d.count > 20,
x: "Designation Date",
r: (d) => d.count,
padding: 7,
text: (d) => d.count.toFixed(),
fill: "white",
fontSize: 7,
fontWeight: "bold"
})
)
]
})```