Open MengyinZhong opened 5 years ago
Thanks for submitting this! I'm looking into it to see what we can do.
I also experience this. Any "color" categories not in the first frame are excluded from all frames.
Similarly, the x and y range are set by the data in the first animation frame instead of all the data.
I also experience this. Any "color" categories not in the first frame are excluded from all frames.
Similarly, the x and y range are set by the data in the first animation frame instead of all the data.
I also experienced this.
@brycedrennan you can fix the x and y range yourself by using range_x and range_y when creating the px object. Example below where the bounds are set for each axis range.
fig = px.scatter(df, x='column1', y='column2', range_x=[0,120], range_y=[0,70])
As for the color categories only including those from the first frame - I am experiencing the same issue
@nicolaskruchten Glad to meet you again:) I just found another problem: color legend cannot show corresponding color when the plot changes
Here is my data just cover two floors: the one was located at B2 between 17:30—18:10, and then it moved to B3. https://github.com/MengyinZhong/test/blob/master/color_legend_test.csv Could you help me to check that and it would be better if you could provide solution to fix it? Thx a lot~😃
1) color legend always show floor=B2F even the dot color changed in the scatter plot.
px.scatter(df, x="loc_x", y="loc_y", color="floor", range_x=[0,200], range_y=[0,100], animation_frame="per10m", category_orders={"floor": ["B3F","B2F", "B1F", "1F", "2F","3F","4F","5F"]})
2) the color legend changed when plotting px.scatter_3d and px.line_3d, but scatter or line cannot show.
px.scatter_3d(df, x="loc_x", y="loc_y", z="floorId", color="floor", animation_frame="per10m", hover_name="floor", range_x=[0,100], range_y=[0,100], range_z=[-3,5])
px.line_3d(df, x="loc_x", y="loc_y", z="floorId", color="floor", animation_frame="per10m", hover_name="floor", range_x=[0,100], range_y=[0,90], range_z=[-3,5], category_orders={"floor": ["B3F","B2F", "B1F", "1F", "2F","3F","4F","5F"]})