Skip to content

xwhy.plots.create_clean_3d_layout

Create a minimal 3D Plotly layout without axes clutter.

Parameters:

Name Type Description Default
title str

The title string to display on the plot.

''

Returns:

Type Description
Layout

A configured Plotly layout object.

Source code in src/xwhy/plots/point_cloud.py
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
def create_clean_3d_layout(title: str = "") -> go.Layout:
    """Create a minimal 3D Plotly layout without axes clutter.

    Args:
        title: The title string to display on the plot.

    Returns:
        A configured Plotly layout object.

    """
    return go.Layout(
        title=title,
        scene={
            "xaxis": {
                "title": "",
                "showticklabels": False,
                "showgrid": False,
                "showbackground": False,
            },
            "yaxis": {
                "title": "",
                "showticklabels": False,
                "showgrid": False,
                "showbackground": False,
            },
            "zaxis": {
                "title": "",
                "showticklabels": False,
                "showgrid": False,
                "showbackground": False,
            },
        },
    )