plotly.R icon indicating copy to clipboard operation
plotly.R copied to clipboard

support for sec_axis

Open bowerth opened this issue 7 years ago • 6 comments

Is there a chance that the sec.axis argument of y-scales will be supported? Unfortunately, the right-hand y-axis does not appear in the ggplotly() output

p <- ggplot(mtcars, aes(cyl, mpg)) +
  geom_point()
## Create a simple secondary axis
p2 <- p + scale_y_continuous(sec.axis = sec_axis(~.+10))
ggplotly(p2)

bowerth avatar Jun 19 '17 10:06 bowerth

Same problem here. Would've been very useful to have that.

aminadibi avatar Apr 04 '18 21:04 aminadibi

I'm happy to give it a shot if more experienced people can point me in the right direction.

adrianoesch avatar Feb 27 '19 12:02 adrianoesch

There's a work in progress here https://github.com/ropensci/plotly/pull/813

cpsievert avatar Feb 27 '19 15:02 cpsievert

though #813 is going further than this and as far as I can see it overlaps with a workstream your doing at #929.

adrianoesch avatar Feb 27 '19 16:02 adrianoesch

I made an initial attempt here. Any ideas why the 2nd axis shows up when named yaxis but not when yaxis2?

adrianoesch avatar Feb 27 '19 23:02 adrianoesch

Has this issue been addressed?

yinghawl avatar May 10 '24 21:05 yinghawl