Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix clusterplot didn't work with 3D data #67

Merged
merged 3 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading