matplotlib

matplotlib.axis.XTick.is_figure_set

XTick.is_figure_set()

Returns whether the artist is assigned to a Figure.