New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secondary axis doesn't work with coord_polar #2072

Closed
Henrik-P opened this Issue Mar 11, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@Henrik-P

Henrik-P commented Mar 11, 2017

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.

@thomasp85

This comment has been minimized.

Member

thomasp85 commented Mar 11, 2017

Can you try this with the development version? It is potentially fixed

@Henrik-P

This comment has been minimized.

Henrik-P commented Mar 11, 2017

I tried with ggplot2_2.2.1.9000, but it didn't work.

@thomasp85

This comment has been minimized.

Member

thomasp85 commented Mar 11, 2017

Ok - then please provide a reproducible example

@Henrik-P

This comment has been minimized.

Henrik-P commented Mar 11, 2017

Sorry if I was unclear - in my original post I used the current CRAN version (2.2.1). I then followed your suggestion and tried the current development version 2.2.1.9000 on the same (reproducible) code, with the same result as in my first attempt.

R version 3.3.3, Platform: i386-w64-mingw32/i386 (32-bit).

@thomasp85

This comment has been minimized.

Member

thomasp85 commented Mar 11, 2017

I'm really just too tired and mixed the conversations. Your example is fine thanks

@karawoo karawoo added the bug label Jun 12, 2017

@hadley hadley closed this in #2188 Jul 3, 2017

@lock lock bot locked as resolved and limited conversation to collaborators Jun 18, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.