title: Shared Categorical Y Axis on Matplotlib
body: <p>I tried the below but this gives wrong results - the Y labels of subplot 1 get incorrectly overwritten by the Y labels of subplot 2.</p>
  
  <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  
  ab = {
     'a': ['a','b','a','b'],
     'b': [1,2,3,4]
  }
  ab = pd.DataFrame(ab)
  
  cd = {
     'c': ['e','e','f','d'],
     'd': [1,2,3,4]
  }
  cd = pd.DataFrame(cd)
  
  
  fig, axs = plt.subplots(
     1, 2,
     figsize = (15, 5), 
     sharey = True,
     sharex = True
  )
  axs[0].scatter(
     ab['b'], 
     ab['a']
  )
  axs[1].scatter(
     cd['d'],
     cd['c']
  )
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/KXKRp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KXKRp.png" alt="enter image description here"></a></p>
  
  <p>The correct result should have all the letters - a,b,d,e,f on the Y axis, preferably in order, and the points of the scatter plot placed correctly.</p>
  
  <p>Thanks!</p>