Modifying the coordinate formatter
Modify the coordinate formatter to report the image "z" value of the nearest
pixel given x and y. This functionality is built in by default; this example
just showcases how to customize the format_coord function.
import matplotlib.pyplot as plt
import numpy as np
# Fixing random state for reproducibility
np
