microsoft / datamations

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

fix for issue #87 #94

Closed giorgi-ghviniashvili closed 2 years ago

giorgi-ghviniashvili commented 3 years ago

Fixed grid generation when coloring and splitField.

sharlagelfand commented 3 years ago

Thanks @giorgi-ghviniashvili, it looks great in the case you showed here!

It seems like it's not working properly when there's also facets, like this:

penguins %>%
  group_by(species, island, sex) %>%
  summarize(median = median(bill_length_mm)) %>%
  ggplot() + 
  geom_point(aes(x = island, y = median, color = sex)) + 
  facet_grid(vars(species))

Will end up looking like this:

p

But the grid generation is not quite right, it "loses" the facets in the frame where the color variable (sex) is added:

https://user-images.githubusercontent.com/15895337/127038656-c4f0a06c-3524-4d73-8546-e5449b4df7d8.mov

I think the specs are generated right, but let me know if something here is off. Thanks!

giorgi-ghviniashvili commented 2 years ago

@sharlagelfand fixed it.

https://user-images.githubusercontent.com/6615532/128209515-2872e765-eda4-4a76-80cb-28250529b29e.mov

sharlagelfand commented 2 years ago

Thanks, looks good!