diff --git a/src/View/HydraulicStructures/PlotAC.py b/src/View/HydraulicStructures/PlotAC.py index d8b81974d612933f8c226ab4cc2c2553068641b2..710b5af71764f5b331167557f395544606f8d7d3 100644 --- a/src/View/HydraulicStructures/PlotAC.py +++ b/src/View/HydraulicStructures/PlotAC.py @@ -118,6 +118,9 @@ class PlotAC(PamhyrPlot): self.line_kp.set_data(x, z) + def clear(self): + self.update_clear() + def update_clear(self): if self.line_kp is not None: self.line_kp.set_data([], []) diff --git a/src/View/HydraulicStructures/PlotKPC.py b/src/View/HydraulicStructures/PlotKPC.py index 961f0a81ec880fd830d79344d11627d00b7d1742..a50c1cb4cbcadf2af80b49028ae05f8ccf4c4810 100644 --- a/src/View/HydraulicStructures/PlotKPC.py +++ b/src/View/HydraulicStructures/PlotKPC.py @@ -147,7 +147,7 @@ class PlotKPC(PamhyrPlot): def clear(self): if self.profile is not None: - self.profile.set_data([], []) + self.profile[0].set_data([], []) if self.line_kp_zmin_zmax is not None: self.line_kp_zmin_zmax.remove()