From 57c0ea8a10d878743b6ce14973504674b802467b Mon Sep 17 00:00:00 2001 From: thorstenwagner Date: Thu, 11 Jan 2024 10:50:52 +0100 Subject: [PATCH 1/2] update axes limits when plotting --- napari_clusters_plotter/_Qt_code.py | 1 + 1 file changed, 1 insertion(+) diff --git a/napari_clusters_plotter/_Qt_code.py b/napari_clusters_plotter/_Qt_code.py index 585dfd10..ef85c24d 100644 --- a/napari_clusters_plotter/_Qt_code.py +++ b/napari_clusters_plotter/_Qt_code.py @@ -617,6 +617,7 @@ def make_2d_histogram( ) self.axes.set_xlim(xedges[0], xedges[-1]) self.axes.set_ylim(yedges[0], yedges[-1]) + self.xylim = (self.axes.get_xlim(), self.axes.get_ylim()) self.histogram = (h, xedges, yedges) self.selector.disconnect() self.selector = SelectFrom2DHistogram(self, self.axes, self.full_data) From f9a10a886a4fb7c9ed70155454f226ac8a6fd8e4 Mon Sep 17 00:00:00 2001 From: thorstenwagner Date: Mon, 15 Jan 2024 09:22:27 +0100 Subject: [PATCH 2/2] fix axes problem for scatter plots --- napari_clusters_plotter/_Qt_code.py | 1 + 1 file changed, 1 insertion(+) diff --git a/napari_clusters_plotter/_Qt_code.py b/napari_clusters_plotter/_Qt_code.py index ef85c24d..bf3ee81a 100644 --- a/napari_clusters_plotter/_Qt_code.py +++ b/napari_clusters_plotter/_Qt_code.py @@ -675,6 +675,7 @@ def make_scatter_plot( self.axes, self.pts, ) + self.xylim = (self.axes.get_xlim(), self.axes.get_ylim()) def match_napari_layout(self): """Change background and axes colors to match napari layout"""