In matplotlib, you can change the tick frequency on the x or y axis of a plot by using the set_xticks() or set_yticks() method of the Axes class.