1 parent d88928b commit 1b2cbb6Copy full SHA for 1b2cbb6
1 file changed
plotnine/geoms/geom_path.py
@@ -96,8 +96,9 @@ def keep(x: Sequence[float]) -> BoolArray:
96
n2 = len(data)
97
98
if n2 != n1 and not self.params["na_rm"]:
99
- msg = "geom_path: Removed {} rows containing missing values."
100
- warn(msg.format(n1 - n2), PlotnineWarning)
+ geom = self.__class__.__name__
+ msg = f"{geom}: Removed {n1 - n2} rows containing missing values."
101
+ warn(msg, PlotnineWarning)
102
103
return data
104
@@ -109,8 +110,9 @@ def draw_panel(
109
110
ax: Axes,
111
):
112
if not any(data["group"].duplicated()):
113
114
warn(
- "geom_path: Each group consist of only one "
115
+ f"{geom}: Each group consist of only one "
116
"observation. Do you need to adjust the "
117
"group aesthetic?",
118
PlotnineWarning,
0 commit comments