Layout
Spotlights layout system works similar to the layout in normal desktop applications.
You can add or remove widgets, rename them, move them around, resize and stack them.
If you find a layout that fits your needs you can easily save it and load it later.
Add and Delete Widget
Widgets can easily be added to an existing Tab group by clicking on the + button in the top of the Tab group. To delete a Widget click on the x button in the top of the Widget.
Resize Widgets
To resize a widget simply drag the widgets border and move it to the desired size. By clicking on the maximize/minimize button a widget can be put to fullscreen mode and vice versa.
Move and Stack Widgets
To move a widget simply drag the widgets title bar and move it to the desired position.
Rename Widgets
In order to rename a widget simply double-click on the widgets title bar and type in the new name.
Save, Load and Reset the Layout
Layouts can easily be saved, loaded or resetted by clicking on the layout button in the top right corner of the window.
Build a layout with the Python API
Instead of composing your layout in the UI and exporting it you can also build it with the Python API.
More information on the layout customization API can be found in the layout API documentation. You can also look at our workflow examples to browse through more complex examples.
This example illustrates the basic functionality:
import pandas as pd
from renumics import spotlight
from renumics.spotlight import layout
df = pd.read_csv("https://spotlight.renumics.com/data/fsd50k/fsd50k-tiny.csv")
spotlight.show(
df,
dtype={"audio": spotlight.Audio, "embedding": spotlight.Embedding},
layout=layout.layout(
[
[layout.table()],
[
layout.similaritymap(
columns=["embedding"],
color_by_column="annotation",
size_by_column="entropy",
)
],
[
layout.histogram(
column="annotation", stack_by_column="prediction_incorrect"
)
],
],
layout.widgets.Inspector(),
),
)