8000 make hlut widget optional by clewis7 · Pull Request #351 · fastplotlib/fastplotlib · GitHub
[go: up one dir, main page]

Skip to content
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
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 = True,
**kwargs,
):
"""
Expand Down Expand Up @@ -288,6 +289,9 @@ def __init__(
names: Optional[str]
gives names to the subplots

histogram_widget: bool, default False
make histogram LUT widget for each subplot

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
0