Add update to scale for last mesh plot

This commit is contained in:
glavic_a committed 2025-10-10 09:23:04 +02:00
1 parent 4c2e344d78
commit f8daa93c48
1 file changed
+7
+7
View File
@@ -597,7 +597,14 @@ class TofZProjection(ProjectionInterface):
"""
Inline update of previous plot by just updating the data.
"""
if isinstance(self._graph.norm, LogNorm):
vmin = self.data.I[(self.data.I>0)].min()*0.5
else:
vmin = 0
vmax = self.data.I.max()
self._graph.set_array(self.data.I.T)
self._graph.norm.vmin = vmin
self._graph.norm.vmax = vmax
def draw_tzcross(self, event):
if event.inaxes is not self._graph_axis: