microsoft / datamations

https://microsoft.github.io/datamations/
Other
66 stars 14 forks source link

Axes labels offset from points in cases with small amount of data #91

Closed sharlagelfand closed 3 years ago

sharlagelfand commented 3 years ago

@giorgi-ghviniashvili I noticed a bug where the axes labels and points don't match up when there is a small amount of data, e.g. 10 points:

library(dplyr)
library(datamations)

small_salary_sample <- small_salary %>%
  group_by(Degree) %>%
  sample_n(5) %>%
  ungroup()

"small_salary_sample %>% group_by(Degree)" %>% datamation_sanddance()

The second frame looks like this:

Screen Shot 2021-07-16 at 2 51 20 PM

It seems to level off and look okay around 50 points, but any smaller is off. You can play around with different group numbers by editing the ns in the specs. Thanks!

giorgi-ghviniashvili commented 3 years ago

@sharlagelfand good point, pushed the fix for that.

sharlagelfand commented 3 years ago

Closed by #92.