Skip to content

error when setting breaks and labels to NULL in coord_radial() #6258

Closed
@Yunuuuu

Description

@Yunuuuu
library(ggplot2)
pie <- ggplot(mtcars, aes(x = factor(cyl), fill = factor(cyl))) +
    geom_bar(width = 1)
pie + coord_radial(theta = "x", inner.radius = 0.5) +
    scale_x_discrete(breaks = NULL, labels = NULL)
#> Error in switch(params$position, theta.sec = -Inf, top = -Inf, right = -Inf, : EXPR must be a length 1 vector

Created on 2024-12-22 with reprex v2.1.0
~

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