Skip to content

Commit 491bccd

Browse files
authored
add kwarg for axes visibility (#891)
1 parent 6cfc994 commit 491bccd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

fastplotlib/layouts/_figure.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ def show(
592592
self,
593593
autoscale: bool = True,
594594
maintain_aspect: bool = None,
595+
axes_visible: bool = True,
595596
sidecar: bool = False,
596597
sidecar_kwargs: dict = None,
597598
):
@@ -606,6 +607,9 @@ def show(
606607
maintain_aspect: bool, default ``True``
607608
maintain aspect ratio
608609
610+
axes_visible: bool, default ``True``
611+
show axes
612+
609613
sidecar: bool, default ``True``
610614
display plot in a ``jupyterlab-sidecar``, only in jupyter
611615
@@ -644,6 +648,11 @@ def show(
644648
_maintain_aspect = maintain_aspect
645649
subplot.auto_scale(maintain_aspect=maintain_aspect)
646650

651+
# set axes visibility if False
652+
if not axes_visible:
653+
for subplot in self:
654+
subplot.axes.visible = False
655+
647656
# parse based on canvas type
648657
if self.canvas.__class__.__name__ == "JupyterRenderCanvas":
649658
if sidecar:

0 commit comments

Comments
 (0)