SolaraS
Solaraβ€’3y ago
dav melchi

```python import solara import solara.express as sx import plotly.express as px @solara.component

import solara
import solara.express as sx
import plotly.express as px


@solara.component
def Page():
    with solara.Column():
        solara.Markdown(f"#Animated Plots")
        
        df_cnt = px.data.gapminder()
        sx.scatter(df_cnt, x="gdpPercap", y="lifeExp", animation_frame="year", 
                animation_group="country",
                size="pop", color="continent", hover_name="country",
                log_x=True, size_max=55, range_x=[100,100000], range_y=[25,90]
                )
        
        fig1 = px.bar(df_cnt, x="continent", y="pop", color="continent",
        animation_frame="year", animation_group="country", range_y=[0,4000000000])
        
        solara.FigurePlotly(fig1)
Was this page helpful?