title: Plotly: How to create a single y-axis label for subplots using R and Shiny?
body: <p>How would I add the Y axis title &quot;Thousands of People&quot; to cover the entire figure, and not for a single subplot row?  The image below shows the y-axis title scrunched at the bottom if the plot.  I'm wanting a single y-axis label, oriented in the middle of the overall chart, not the middle of the subplot-row.  BONUS: keep the y axis title orientation while allowing the layout(autosize = TRUE).</p>
  <pre><code>library(plotly)
    plotList &lt;- function(nplots) {
     lapply(seq_len(nplots), function(x) {
      plot_ly(economics, x = ~date, y = ~unemploy)%&gt;%
        add_annotations(
          text = ~paste(&quot;Plot &quot;,x),
          x = 0.5,
          y = 1.1,
          yref = &quot;paper&quot;,
          xref = &quot;paper&quot;,
          xanchor = &quot;middle&quot;,
          yanchor = &quot;top&quot;,
          showarrow = FALSE)
    }
      )
  }
  s1 &lt;- subplot(plotList(4), nrows = 4, shareX = TRUE, shareY = TRUE, titleY = FALSE, margin = .01)
  s2 &lt;- subplot(plotList(2), shareY = TRUE)
  fig &lt;- subplot(s1, s2, 
                 plot_ly(economics, x = ~date, y = ~unemploy)%&gt;%
                   layout(yaxis = list(title = 'Total Unemployed Persons')), 
                          nrows = 3, 
                          margin = 0.04, heights = c(0.6, 0.3, 0.1),
                          titleY = TRUE)
  
  fig
  </code></pre>
  <p>ORIGINAL CHART:
  <a href="https://i.stack.imgur.com/cx2s0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cx2s0.png" alt="enter image description here" /></a></p>
  <p>DESIRED CHART:
  <a href="https://i.stack.imgur.com/dsKj4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dsKj4.png" alt="enter image description here" /></a>
  These links may help anyone trying to answer: <a href="https://community.plotly.com/t/subplot-y-axis-names/2683/2" rel="nofollow noreferrer">r plotly community</a>, and <a href="https://community.plotly.com/t/subplots-how-to-add-master-axis-titles/13927" rel="nofollow noreferrer">python plotly community</a></p>