Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

change residual occurances of image_graphics to managed_graphic #251

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

Merged
merged 1 commit into from
Jun 22, 2023
Merged
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
8 changes: 3 additions & 5 deletions 8 fastplotlib/widgets/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,6 @@ def __init__(

self._gridplot: GridPlot = GridPlot(shape=grid_shape, **grid_plot_kwargs)

self.image_graphics = list()
for data_ix, (d, subplot) in enumerate(zip(self.data, self.gridplot)):
minmax = quick_min_max(self.data[data_ix])

Expand Down Expand Up @@ -516,7 +515,6 @@ def __init__(
subplot.add_graphic(ig)
subplot.name = name
subplot.set_title(name)
# self.image_graphics.append(ig)

self.gridplot.renderer.add_event_handler(self._set_slider_layout, "resize")

Expand Down Expand Up @@ -765,8 +763,8 @@ def _vmin_vmax_slider_changed(
change: dict
):
vmin, vmax = change["new"]
self.image_graphics[data_ix].cmap.vmin = vmin
self.image_graphics[data_ix].cmap.vmax = vmax
self.managed_graphics[data_ix].cmap.vmin = vmin
self.managed_graphics[data_ix].cmap.vmax = vmax

def _set_slider_layout(self, *args):
w, h = self.gridplot.renderer.logical_size
Expand Down Expand Up @@ -809,7 +807,7 @@ def reset_vmin_vmax(self):
"""
Reset the vmin and vmax w.r.t. the currently displayed image(s)
"""
for i, ig in enumerate(self.image_graphics):
for i, ig in enumerate(self.managed_graphics):
mm = self._get_vmin_vmax_range(ig.data())

if len(self.vmin_vmax_sliders) != 0:
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.