✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Overlaying dynamic quiver arrows on a dynamic scatter plot

Hi - I have used Plotly Express to plot an animated scatter plot representing a wind farm, showing the varying power generation and wind speed for each turbine (WTG) over time, but I’m struggling to overlay the corresponding varying yaw direction of the turbines using a quiver plot. The following line works for plotting d.Lat, d.Lon, d.power, and d.wind speed. The d data frame has d.u and d.v components for the quiver arrow for each time step & turbine, but a simple add_trace of the figure factory create_quiver plot using Lat, Lon, u and v doesn’t work. The add_trace quivers do work if I only plot them for one time step (for example just the first step), but then they are static for all times in the animation, which is not what I want.

fig = px.scatter(d,x=“Lon”,y=“Lat”,animation_frame=“time”,animation_group=“WTG”,
size=“power”,color=“wind”,hover_name=“WTG”,
range_color=[0.1,25.0],size_max=20,title=header)

Any help or suggestions would be appreciated!