From 2b4354481c6f0341ced94526f29035840d326adb Mon Sep 17 00:00:00 2001 From: corvince <13568919+Corvince@users.noreply.github.com> Date: Thu, 5 Sep 2024 11:18:29 +0200 Subject: [PATCH] Add visualization element explanation --- examples/boltzmann_wealth_model_experimental/app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/boltzmann_wealth_model_experimental/app.py b/examples/boltzmann_wealth_model_experimental/app.py index c1e1a1ac..b53b5e6c 100644 --- a/examples/boltzmann_wealth_model_experimental/app.py +++ b/examples/boltzmann_wealth_model_experimental/app.py @@ -27,7 +27,11 @@ def agent_portrayal(agent): # Create initial model instance model1 = BoltzmannWealthModel(50, 10, 10) -# Create visualization elements +# Create visualization elements. The visualization elements are solara components +# that receive the model instance as a "prop" and display it in a certain way. +# Under the hood these are just functions that receive the model instance. +# You can also author your own visualization elements, they just have to return +# a valid solara component or an ipywidget. SpaceGraph = make_space_matplotlib(agent_portrayal) GiniPlot = make_plot_measure("Gini")