title: Ggplotly() hides secondary y-axis created with ggplot2
body: <p>I have the dataframe below and Im trying to create a double y-axis plot with <code>ggplot2</code> and then turn it to <code>ggplotly()</code>. The issue is that while the plot is created normally using <code>ggplot2</code> when I turn it to <code>ggplotly()</code> object the secondary y-axis is disapperaed.</p>
  <pre><code>df2&lt;-structure(list(year = c(1951, 1954, 1955, 1957, 1958, 1960, 1961, 
  1962, 1963, 1964, 1965, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 
  1974, 1975, 1976, 1977, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 
  1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 
  1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 
  2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019), 
      Scope = c(4, 3, 5, 27, 6, 13, 6, 6, 24, 1, 21, 24, 32, 57, 
      18, 1, 43, 39, 8, 58, 68, 78, 7, 20, 26, 4, 12, 19, 8, 37, 
      35, 51, 209, 478, 395, 355, 453, 457, 262, 148, 196, 180, 
      367, 283, 360, 414, 175, 330, 314, 446, 428, 163, 213, 165, 
      307, 231, 53, 189, 18, 104, 39), count = c(1, 1, 1, 1, 2, 
      4, 1, 2, 2, 1, 3, 2, 3, 6, 4, 1, 9, 6, 3, 4, 5, 5, 2, 3, 
      2, 2, 2, 4, 3, 3, 5, 5, 14, 26, 18, 25, 23, 26, 19, 13, 12, 
      13, 20, 22, 24, 25, 14, 21, 15, 22, 18, 8, 13, 6, 11, 9, 
      5, 5, 1, 3, 1), fiveYears = c(&quot;1951-1955&quot;, &quot;1951-1955&quot;, &quot;1951-1955&quot;, 
      &quot;1957-1961&quot;, &quot;1957-1961&quot;, &quot;1957-1961&quot;, &quot;1957-1961&quot;, &quot;1962-1965&quot;, 
      &quot;1962-1965&quot;, &quot;1962-1965&quot;, &quot;1962-1965&quot;, &quot;1967-1971&quot;, &quot;1967-1971&quot;, 
      &quot;1967-1971&quot;, &quot;1967-1971&quot;, &quot;1967-1971&quot;, &quot;1972-1977&quot;, &quot;1972-1977&quot;, 
      &quot;1972-1977&quot;, &quot;1972-1977&quot;, &quot;1972-1977&quot;, &quot;1972-1977&quot;, &quot;1979-1982&quot;, 
      &quot;1979-1982&quot;, &quot;1979-1982&quot;, &quot;1979-1982&quot;, &quot;1983-1986&quot;, &quot;1983-1986&quot;, 
      &quot;1983-1986&quot;, &quot;1983-1986&quot;, &quot;1988-1992&quot;, &quot;1988-1992&quot;, &quot;1988-1992&quot;, 
      &quot;1988-1992&quot;, &quot;1993-1998&quot;, &quot;1993-1998&quot;, &quot;1993-1998&quot;, &quot;1993-1998&quot;, 
      &quot;1993-1998&quot;, &quot;1993-1998&quot;, &quot;1999-2003&quot;, &quot;1999-2003&quot;, &quot;1999-2003&quot;, 
  &quot;1999-2003&quot;, &quot;1999-2003&quot;, &quot;2004-2008&quot;, &quot;2004-2008&quot;, &quot;2004-2008&quot;, 
      &quot;2004-2008&quot;, &quot;2004-2008&quot;, &quot;2009-2013&quot;, &quot;2009-2013&quot;, &quot;2009-2013&quot;, 
      &quot;2009-2013&quot;, &quot;2009-2013&quot;, &quot;2014-2019&quot;, &quot;2014-2019&quot;, &quot;2014-2019&quot;, 
      &quot;2014-2019&quot;, &quot;2014-2019&quot;, &quot;2014-2019&quot;), Scope_min = c(3, 
      3, 3, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 8, 
      8, 8, 4, 4, 4, 4, 8, 8, 8, 8, 35, 35, 35, 35, 148, 148, 148, 
      148, 148, 148, 180, 180, 180, 180, 180, 175, 175, 175, 175, 
      175, 163, 163, 163, 163, 163, 18, 18, 18, 18, 18, 18), Scope_max = c(5, 
      5, 5, 27, 27, 27, 27, 24, 24, 24, 24, 57, 57, 57, 57, 57, 
      78, 78, 78, 78, 78, 78, 26, 26, 26, 26, 37, 37, 37, 37, 478, 
      478, 478, 478, 457, 457, 457, 457, 457, 457, 367, 367, 367, 
      367, 367, 446, 446, 446, 446, 446, 428, 428, 428, 428, 428, 
      231, 231, 231, 231, 231, 231)), class = c(&quot;tbl_df&quot;, &quot;tbl&quot;, 
  &quot;data.frame&quot;), row.names = c(NA, -61L))
  library(ggplot2)
  library(plotly)
  p&lt;-ggplot(df2, aes(x=year)) +
    
    geom_point( aes(y=Scope), size=2, color=y1Color) +
    geom_errorbar(aes(ymin=Scope_min, ymax=Scope_max), width=.1)+
    geom_point( aes(y=count), size=2, color=y2Color) +
    
    scale_y_continuous(
      
      # Features of the first axis
      name = &quot;Scope&quot;,
      
      # Add a second axis and specify its features
      sec.axis = sec_axis(~.*1, name=&quot;pta&quot;)
    ) + 
    
    theme_minimal() +
    
    theme(
      axis.title.y = element_text(color = y1Color, size=13),
      axis.title.y.right = element_text(color = y2Color, size=13)
    ) +
    
    ggtitle(&quot;Temperature down, price up&quot;)
  ggplotly(p)
  </code></pre>