Skip to content
Merged
Changes from 1 commit
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
23 changes: 14 additions & 9 deletions fastplotlib/widgets/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def __init__(
grid_shape: Tuple[int, int] = None,
names: List[str] = None,
grid_plot_kwargs: dict = None,
histogram_widget: bool = False,
Comment thread
clewis7 marked this conversation as resolved.
Outdated
Comment thread
clewis7 marked this conversation as resolved.
Outdated
**kwargs,
):
"""
Expand Down Expand Up @@ -288,6 +289,9 @@ def __init__(
names: Optional[str]
gives names to the subplots

histogram_widget: bool, default False
determines whether each subplot is rendered with a Histogram LUT widget
Comment thread
clewis7 marked this conversation as resolved.
Outdated
Comment thread
clewis7 marked this conversation as resolved.
Outdated

kwargs: Any
passed to fastplotlib.graphics.Image

Expand Down Expand Up @@ -556,16 +560,17 @@ def __init__(
subplot.name = name
subplot.set_title(name)

hlut = HistogramLUT(
data=d,
image_graphic=ig,
name="histogram_lut"
)
if histogram_widget:
hlut = HistogramLUT(
data=d,
image_graphic=ig,
name="histogram_lut"
)

subplot.docks["right"].add_graphic(hlut)
subplot.docks["right"].size = 80
subplot.docks["right"].auto_scale(maintain_aspect=False)
subplot.docks["right"].controller.enabled = False
subplot.docks["right"].add_graphic(hlut)
subplot.docks["right"].size = 80
subplot.docks["right"].auto_scale(maintain_aspect=False)
subplot.docks["right"].controller.enabled = False

self.block_sliders = False
self._image_widget_toolbar = None
Expand Down