Version 3.1.2
matplotlib

matplotlib.axis.XAxis.cla

XAxis.cla()

clear the current axis