diff --git a/plotpy/items/image/base.py b/plotpy/items/image/base.py
index 28721ac..90fdf2f 100644
--- a/plotpy/items/image/base.py
+++ b/plotpy/items/image/base.py
@@ -398,7 +398,8 @@ def get_coordinates_label(self, x: float, y: float) -> str:
"""
title = self.title().text()
z = self.get_data(x, y)
- return f"{title}:
x = {int(x):d}
y = {int(y):d}
z = {z:g}"
+ zstr = "--" if z is np.ma.masked else f"{z:g}"
+ return f"{title}:
x = {int(x):d}
y = {int(y):d}
z = {zstr}"
def set_background_color(self, qcolor: QColor | str) -> None:
"""Set background color