Skip to content
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
Closed

Secondary axis doesn't work with coord_polar #2072

Henrik-P opened this issue Mar 11, 2017 · 5 comments
Labels
bug

Comments

@Henrik-P
Copy link
Contributor

@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
Copy link
Member

@thomasp85 thomasp85 commented Mar 11, 2017

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

@Henrik-P
Copy link
Contributor Author

@Henrik-P Henrik-P commented Mar 11, 2017

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

@thomasp85
Copy link
Member

@thomasp85 thomasp85 commented Mar 11, 2017

Ok - then please provide a reproducible example

@Henrik-P
Copy link
Contributor Author

@Henrik-P 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
Copy link
Member

@thomasp85 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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants