Skip to content

Commit

Permalink
Merge pull request #67 from haesleinhuepf/bugfix_clusterplot_3d
Browse files Browse the repository at this point in the history
Bugfix clusterplot didn't work with 3D data
  • Loading branch information
haesleinhuepf authored Aug 18, 2024
2 parents 3b7aa31 + f457f9a commit 45877d7
Show file tree
Hide file tree
Showing 5 changed files with 315 additions and 4 deletions.
306 changes: 306 additions & 0 deletions docs/clusterplot.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="stackview",
version="0.8.1",
version="0.8.2",
author="Robert Haase",
author_email="robert.haase@uni-leipzig.de",
description="Interactive image stack viewing in jupyter notebooks",
Expand Down
2 changes: 1 addition & 1 deletion stackview/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.8.1"
__version__ = "0.8.2"

from ._static_view import jupyter_displayable_output, insight
from ._utilities import merge_rgb
Expand Down
5 changes: 4 additions & 1 deletion stackview/_clusterplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def clusterplot(df, labels, column_x:str="x", column_y:str="y", column_selection
from ._scatterplot import scatterplot
import functools

labels = np.asarray(labels)

if column_selection in df.columns:
selection = df["selection"].tolist()

Expand Down Expand Up @@ -72,6 +74,7 @@ def update(selection, label_image, selected_image, widget):

return grid([[
image_display,
scatterplot
scatterplot,

]])

4 changes: 3 additions & 1 deletion stackview/_scatterplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ def __init__(self, df, column_x, column_y, column_selection, figsize, selection_
manager = Gcf.get_active()
Gcf.figs.pop(manager.num, None)

self.selector = Selector(self.fig, self.ax, self.plotted_points, callback=self.set_selection)
self.selector = None
#self.selector = Selector(self.fig, self.ax, self.plotted_points, callback=self.set_selection)
self.update()

# show selection if defined
if column_selection in df.columns:
Expand Down

0 comments on commit 45877d7

Please sign in to comment.