In Edit Mode, outputs like dataframes and figures are rendered automatically. In App Mode, no outputs are shown unless explicitly defined. Output widgets allow you to specify which elements should be visible, providing fine-grained control over the app interface.

Supported Output Widget Types

Below is a comprehensive list of supported output widget types.

Output Widget Reactivity

Output widgets are reactive to changes in their source data. When the source plot or data is updated, the widget display will automatically update to reflect the changes.

Example:

import matplotlib.pyplot as plt
from lplots.widgets.plot import w_plot

# Create initial plot
fig, ax = plt.subplots()
line, = ax.plot([1, 2, 3], [1, 2, 3])
ax.set_title("Dynamic Plot")

# Display the plot
plot = w_plot(label="Updating Plot", source=fig)

# Update the plot data
line.set_ydata([2, 1, 3])
fig.canvas.draw()  # Plot will automatically update in the widget