Skip to content

Navigation Menu

Sign in
Appearance settings

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

Commit c1cf47f

Browse filesBrowse files
authored
make hlut widget optional (#351)
* make hlut widget optional * Apply suggestions from code review
1 parent 430f513 commit c1cf47f
Copy full SHA for c1cf47f

File tree

1 file changed

+14
-9
lines changed
Filter options

1 file changed

+14
-9
lines changed

‎fastplotlib/widgets/image.py

Copy file name to clipboardExpand all lines: fastplotlib/widgets/image.py
+14-9Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ def __init__(
225225
grid_shape: Tuple[int, int] = None,
226226
names: List[str] = None,
227227
grid_plot_kwargs: dict = None,
228+
histogram_widget: bool = True,
228229
**kwargs,
229230
):
230231
"""
@@ -288,6 +289,9 @@ def __init__(
288289
names: Optional[str]
289290
gives names to the subplots
290291
292+
histogram_widget: bool, default False
293+
make histogram LUT widget for each subplot
294+
291295
kwargs: Any
292296
passed to fastplotlib.graphics.Image
293297
@@ -556,16 +560,17 @@ def __init__(
556560
subplot.name = name
557561
subplot.set_title(name)
558562

559-
hlut = HistogramLUT(
560-
data=d,
561-
image_graphic=ig,
562-
name="histogram_lut"
563-
)
563+
if histogram_widget:
564+
hlut = HistogramLUT(
565+
data=d,
566+
image_graphic=ig,
567+
name="histogram_lut"
568+
)
564569

565-
subplot.docks["right"].add_graphic(hlut)
566-
subplot.docks["right"].size = 80
567-
subplot.docks["right"].auto_scale(maintain_aspect=False)
568-
subplot.docks["right"].controller.enabled = False
570+
subplot.docks["right"].add_graphic(hlut)
571+
subplot.docks["right"].size = 80
572+
subplot.docks["right"].auto_scale(maintain_aspect=False)
573+
subplot.docks["right"].controller.enabled = False
569574

570575
self.block_sliders = False
571576
self._image_widget_toolbar = None

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.