Home > Enterprise >  How to share the x-axis in these stack plots
How to share the x-axis in these stack plots

Time:02-01

I am trying to share the have the same x-axis for these two plots, but the sharex=true is not working as I thought it would.

fig, ax = plt.subplots(figsize=(12,5),sharex=True)
ax = plt.subplot(211)
sns.lineplot(x ='Date', y = 'Air1', data = df, label = 'Temp °C') 
ax = plt.subplot(212)
sns.lineplot(x ='Date', y = 'Air2', data = df, label = 'Temp °C')

Thanks in advance!

enter image description here

  •  Tags:  
  • Related