setup(axs[1], title="FixedFormatter(["A", "B", "C", ...])")
// FixedFormatter should only be used together with FixedLocator.
// Otherwise, one cannot be sure where the labels will end up.
positions = [0, 1, 2, 3, 4, 5]
labels = ["A", "B", "C", "D", "E", "F"]
axs[1].xaxis.set_major_locator(ticker.FixedLocator(positions))
axs[1].xaxis.set_major_formatter(ticker.FixedFormatter(labels))
After Change
// The first two examples directly pass a ``str`` or function.
fig0, axs0 = plt.subplots(2, 1, figsize=(8, 2))
fig0.suptitle("Simple Formatting")
// A ``str``, using format string function syntax, can be used directly as a
// formatter. The variable ``x`` is the tick value and the variable ``pos`` is