Skip to content

Cannot plot categorical data #33

Description

@wcerfgba

Hello,

I am trying to use scatterpie with categorical x and y variables but I get the following error when I try:

Error in r[i1] - r[-length(r):-(length(r) - lag + 1L)] : 
  non-numeric argument to binary operator

Here is a minimal reproducible example:

data <- data.frame(
  x = sample(c('a', 'b', 'c'), 10, replace = TRUE),
  y = sample(c('t', 'u', 'v'), 10, replace = TRUE),
  m = rnorm(10),
  n = rnorm(10)
)
ggplot() +
  geom_scatterpie(
    aes(
      x = x,
      y = y
    ),
    data = data,
    cols = c(m, n)
  )

I have seen two other issues about this (#2 and #13) but I don't see any example in the vignette: all examples in the vignette are continuous lat and long x/y.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions