Skip to content

Secondary axis doesn't work with coord_polar #2072

Closed
@Henrik-P

Description

@Henrik-P

When adding a secondary axis (dup_axis / sec_axis) to a plot with polar coordinates (coord_polar), the labels and the tick marks doesn't show up. The name appears though.

ggplot(mtcars, aes(x = factor(cyl))) +
  geom_bar() +
  coord_polar() +
  scale_y_continuous(sec.axis = dup_axis())

ggplot(mtcars, aes(x = factor(cyl))) +
  geom_bar() +
  coord_polar() +
  scale_y_continuous(sec.axis = sec_axis(~. * 0.1, name = "sec count"))

See also this post on SO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions