You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Been using beeswarm for a while (e.g., in our blog Data Colada). Now using it for a new pkg that creates plots for reporting results from psychology experiments, and one of the plots we wanted to offer was the beeswarm plot, but using text-labels instead of markers.
Like. Imagine with data at the State level in the US and every 'marker' is the two letter abbreviation for the state (AZ, AK, etc.)
You can see an example inm the uploaded plot. I ended up creating a beeswarm, without plotting, using the exprted values, and then using text() to populate it, but maybe it could be built into the package as an option. Just a suggestion.
The text was updated successfully, but these errors were encountered:
Here I set spacing = 4 based on trial and error. I think this works pretty well with state abbreviations, since they are all around the same size.
Are you proposing a more automatic approach, such as taking the size of each individual label into account when doing the layout? (maybe similar to #5 but with text instead of points?)
Yes, that's basically what i did, but i think some automatic spacing would be needed to prevent overstepping too much
i find it hard to navigate the mapping between text and absolute dimensions so could be tricky
The hacky way I did was to compute the average length of the labels and convert that to the horizontal spacing.
LIke this
Been using beeswarm for a while (e.g., in our blog Data Colada). Now using it for a new pkg that creates plots for reporting results from psychology experiments, and one of the plots we wanted to offer was the beeswarm plot, but using text-labels instead of markers.
Like. Imagine with data at the State level in the US and every 'marker' is the two letter abbreviation for the state (AZ, AK, etc.)
You can see an example inm the uploaded plot. I ended up creating a beeswarm, without plotting, using the exprted values, and then using text() to populate it, but maybe it could be built into the package as an option. Just a suggestion.
The text was updated successfully, but these errors were encountered: