Skip to content

Scatterplot in which the grouping variable takes more than 4 different values does not work #28

@lukr90

Description

@lukr90

Example from Documentation with grouping by cyl works. cyl takes three different values 4 6 and 8

billboarder(data = mtcars) %>% 
  bb_scatterplot(
   mapping = aes(wt, mpg, group = cyl, size = scales::rescale(qsec, to = c(0.2, 7))),
   point_opacity = 1
  ) %>% 
  bb_axis(x = list(tick = list(fit = FALSE))) %>% 
  bb_x_grid(show = TRUE) %>%
  bb_y_grid(show = TRUE)

whereas grouping by carb does not work. carb takes six different values 1 2 3 4 6 and 8

billboarder(data = mtcars) %>% 
    bb_scatterplot(
        mapping = aes(wt, mpg, group = carb, size = scales::rescale(qsec, to = c(0.2, 7))),
        point_opacity = 1
    ) %>% 
    bb_axis(x = list(tick = list(fit = FALSE))) %>% 
    bb_x_grid(show = TRUE) %>%
    bb_y_grid(show = TRUE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions