title: Plotly: How to hide axis titles in a plotly express figure with facets?
body: <p>Is there a simple way to hide the repeated axis titles in a faceted chart using plotly express?  I tried setting</p>
  <pre><code>visible=True
  </code></pre>
  <p>In the code below,  but that also hid the y axis tick labels (the values).  Ideally,  I would like to set hiding the repeated axes titles a default for faceted plots in general (or even better,  just defaulting to showing a single x and y axis title for the entire faceted figure.</p>
  <p>Here is the test code:</p>
  <pre><code>import pandas as pd
  import numpy as np
  import plotly.express as px
  import string
  
  # create a dataframe
  cols = list(string.ascii_letters)
  n = 50
  
  df = pd.DataFrame({'Date': pd.date_range('2021-01-01', periods=n)})
  
  # create data with vastly different ranges
  for col in cols:
      start = np.random.choice([1, 10, 100, 1000, 100000])
      s = np.random.normal(loc=0, scale=0.01*start, size=n)
      df[col] = start + s.cumsum()
  
  # melt data columns from wide to long
  dfm = df.melt(&quot;Date&quot;)
  
  fig = px.line(
      data_frame=dfm,
      x = 'Date',
      y = 'value',
      facet_col = 'variable',
      facet_col_wrap=6,
      facet_col_spacing=0.05,
      facet_row_spacing=0.035,
      height = 1000,
      width = 1000,
      title = 'Value vs. Date'
  )
  
  fig.update_yaxes(matches=None, showticklabels=True, visible=True)
  fig.update_annotations(font=dict(size=16))
  fig.for_each_annotation(lambda a: a.update(text=a.text.split(&quot;=&quot;)[-1]))
  </code></pre>
  <p><a href="https://i.stack.imgur.com/u6giQ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/u6giQ.png" alt="enter image description here" /></a></p>
  <p><strong>Final Code (accepted answer).  Note plotly &gt;= 4.9</strong></p>
  <pre><code>import pandas as pd
  import numpy as np
  import plotly.express as px
  import string
  import plotly.graph_objects as go
  
  # create a dataframe
  cols = list(string.ascii_letters)
  n = 50
  
  df = pd.DataFrame({'Date': pd.date_range('2021-01-01', periods=n)})
  
  # create data with vastly different ranges
  for col in cols:
      start = np.random.choice([1, 10, 100, 1000, 100000])
      s = np.random.normal(loc=0, scale=0.01*start, size=n)
      df[col] = start + s.cumsum()
  
  # melt data columns from wide to long
  dfm = df.melt(&quot;Date&quot;)
  
  fig = px.line(
      data_frame=dfm,
      x = 'Date',
      y = 'value',
      facet_col = 'variable',
      facet_col_wrap=6,
      facet_col_spacing=0.05,
      facet_row_spacing=0.035,
      height = 1000,
      width = 1000,
      title = 'Value vs. Date'
  )
  
  fig.update_yaxes(matches=None, showticklabels=True, visible=True)
  fig.update_annotations(font=dict(size=16))
  fig.for_each_annotation(lambda a: a.update(text=a.text.split(&quot;=&quot;)[-1]))
  
  # hide subplot y-axis titles and x-axis titles
  for axis in fig.layout:
      if type(fig.layout[axis]) == go.layout.YAxis:
          fig.layout[axis].title.text = ''
      if type(fig.layout[axis]) == go.layout.XAxis:
          fig.layout[axis].title.text = ''
          
  # keep all other annotations and add single y-axis and x-axis title:
  fig.update_layout(
      # keep the original annotations and add a list of new annotations:
      annotations = list(fig.layout.annotations) + 
      [go.layout.Annotation(
              x=-0.07,
              y=0.5,
              font=dict(
                  size=16, color = 'blue'
              ),
              showarrow=False,
              text=&quot;single y-axis title&quot;,
              textangle=-90,
              xref=&quot;paper&quot;,
              yref=&quot;paper&quot;
          )
      ] +
      [go.layout.Annotation(
              x=0.5,
              y=-0.08,
              font=dict(
                  size=16, color = 'blue'
              ),
              showarrow=False,
              text=&quot;Dates&quot;,
              textangle=-0,
              xref=&quot;paper&quot;,
              yref=&quot;paper&quot;
          )
      ]
  )
  
  fig.show()
  </code></pre>