I have a data frame like the below: 
Every row represents a person. They stay at 3 different locations for some time given on the dataframe. The first few people don't stay at location1 but they "born" at location2. The rest of them stay at every locations (3 locations).
I would like to animate every person at the given X, Y coordinates given on the data frame and represent them as dots or any other shape. Here is the flow:
- Every person should appear at the first given location (location1) at the given time. Their color should be blue at this state.
- Stay at location1 until location2_time and then appear at location2. Their color should be red at this state.
- Stay at location2 until location3_time and then appear at location3. Their color should be red at this state.
- Stay at location3 for 3 seconds and disappear forever.
There can be several people on the visual at the same time. How can I do that?
There are some good answers on the below links. However, on these solutions, points don't disappear.
from How to animate a 2D scatter plot given X, Y coordinates and time with appearing and disappearing points?
No comments:
Post a Comment