Set the axis titles on the intended Axes
Matplotlib documents set_xlabel and set_ylabel as the methods for the text naming an axis. For example, use ax.set_xlabel("Time (s)", fontsize=12) and ax.set_ylabel("Distance (m)", fontsize=12). Apply the calls to the Axes object containing the actual plot. Keep the units in the label if the figure needs them.
Set the scale numbers separately
For existing tick labels, try ax.tick_params(axis="both", labelsize=9). Use axis="x" if the change applies only to the horizontal scale. A title such as Time (s) and the numbers below it are different text objects. Compare them together before increasing all text settings globally.
Proof the exported panel at final size
Include the longest axis title and the most crowded run of tick labels. If they overlap, compare fewer ticks or a larger panel before shrinking the words. Export using the intended figure size and inspect it in the final document. For a separate copyable chart caption, try the homepage text-style tool.
Your questions, answered.
Why did changing the axis title size leave the numbers unchanged?
The title and tick numbers are separate. Use the axis title method for the first and tick_params for the second.
How can I change tick labels on only one axis?
Set the axis argument to x or y on the intended Axes object.
Sources & background
Sources supporting this page’s explanations. Practical examples are our editorial suggestions.