title: Plotly: How to plot multiple lines with shared x-axis?
body: <p>I would like to have a multiple line plot within same canvas tied with the same x-axis as shown something in the <a href="https://i.stack.imgur.com/7TeiR.png" rel="nofollow noreferrer">figure</a>:</p>
  <p><a href="https://i.stack.imgur.com/aIOa5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aIOa5.png" alt="enter image description here" /></a></p>
  <p>Using subplots does not achieve the intended desire.</p>
  <pre><code>import plotly.express as px
  from plotly.subplots import make_subplots
  import plotly.graph_objects as go
  
  fig = make_subplots(rows=2, shared_xaxes=True,vertical_spacing=0.1)
  fig.add_scatter(y=[2, 1, 3], row=1, col=1)
  fig.add_scatter(y=[1, 3, 2], row=2, col=1)
  fig.show()
  </code></pre>
  <p>May I know how this can be done, appreciate if someone can point to good reading material</p>