# Calculate min, max, levels, ticks
pmin = px_values.min().min()
pmax = px_values.max().max()
levels = np.linspace(pmin, pmax, 30)
ticks = np.linspace(pmin, pmax, 6)
# Create plots
fig, ax = plt.subplots(1,3, figsize=(9,4)) # Add figsize argument here to set figure side
ax[0].contourf(x, y, px_values, vmin=pmin, vmax=pmax, levels=levels, cmap="RdBu")
ax[1].contourf(x, y, py_values, vmin=pmin, vmax=pmax, levels=levels, cmap="RdBu")
CS= ax[2].contourf(x, y, pz_values, vmin=pmin, vmax=pmax, levels=levels, cmap="RdBu")
for i in range(3):
ax[i].set_aspect('equal')
# Add and format colorbar
fig.colorbar(CS, ax=ax[:], location='bottom', format="%.3f", ticks=ticks)