Skip to content

Replace deprecated IndexFormatter #3848

@stephenworsley

Description

@stephenworsley

📰 Custom Issue

Matplotlib has deprecated the IndexFormatter class matplotlib/matplotlib#16170 is used in only one place in the Iris code:

iris/lib/iris/plot.py

Lines 251 to 256 in a2f49c3

for axis, ticks in string_axes.items():
formatter = mpl_ticker.IndexFormatter(ticks)
locator = mpl_ticker.MaxNLocator(integer=True)
this_axis = getattr(ax, axis)
this_axis.set_major_formatter(formatter)
this_axis.set_major_locator(locator)

A suggestion is given here for how to replace IndexFormatter with a given example matplotlib/matplotlib#16631 (comment).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions