From c9c5d4930405fb509fec41a81b421e1a6df8afc8 Mon Sep 17 00:00:00 2001 From: clewis7 Date: Sat, 30 Aug 2025 10:30:21 -0400 Subject: [PATCH] add kwarg for axes visibility --- fastplotlib/layouts/_figure.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fastplotlib/layouts/_figure.py b/fastplotlib/layouts/_figure.py index af1a6a610..a4e219757 100644 --- a/fastplotlib/layouts/_figure.py +++ b/fastplotlib/layouts/_figure.py @@ -592,6 +592,7 @@ def show( self, autoscale: bool = True, maintain_aspect: bool = None, + axes_visible: bool = True, sidecar: bool = False, sidecar_kwargs: dict = None, ): @@ -606,6 +607,9 @@ def show( maintain_aspect: bool, default ``True`` maintain aspect ratio + axes_visible: bool, default ``True`` + show axes + sidecar: bool, default ``True`` display plot in a ``jupyterlab-sidecar``, only in jupyter @@ -644,6 +648,11 @@ def show( _maintain_aspect = maintain_aspect subplot.auto_scale(maintain_aspect=maintain_aspect) + # set axes visibility if False + if not axes_visible: + for subplot in self: + subplot.axes.visible = False + # parse based on canvas type if self.canvas.__class__.__name__ == "JupyterRenderCanvas": if sidecar: