Subplots that share X axis
import matplotlib.pyplot as plt
data1 = {'objects': ['apple', 'banana', 'mango', 'orange', 'tomato', 'potato'], 'price':[4, 7, 12, 10, 9, 14]}
fig, ax = plt.subplots(2, 1, sharex=True)
ax[0].bar(data1['objects'], data1['price'])
ax[1].plot(data1['objects'], data1['price'])
fig.suptitle('Subplot example')
Text(0.5, 0.98, 'Subplot example')