ac69b1035a42e47798e4ea7167f616754be49452,examples/ticks_and_spines/tick-formatters.py,,,#,37

Before Change


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
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: matplotlib/matplotlib
Commit Name: ac69b1035a42e47798e4ea7167f616754be49452
Time: 2020-05-01
Author: toddrjen@gmail.com
File Name: examples/ticks_and_spines/tick-formatters.py
Class Name:
Method Name:


Project Name: matplotlib/matplotlib
Commit Name: a46410ecb58c5f0214bbb4ae8c6eba5fb1f5edb0
Time: 2017-05-09
Author: choldgraf@gmail.com
File Name: examples/lines_bars_and_markers/categorical_variables.py
Class Name:
Method Name:


Project Name: matplotlib/matplotlib
Commit Name: 0d4effdbbd9a5b80659af658c6c1d76ffea61144
Time: 2018-12-09
Author: anntzer.lee@gmail.com
File Name: examples/misc/cursor_demo_sgskip.py
Class Name:
Method Name: