0

When I plot the animated scatter plot, the animation frame does not layout ticks in ascending or descending order. This appears regardless of the column used, and despite the x-axis retaining a regular order when the same column is used on the x-axis as the animation frame.

I have attempted to reorder the animation frame with category_orders and category order, and have plotted the scatter with two versions of code.

Version one

px.scatter(i1, x="over", y="r_runs",animation_frame="over")

Version two, with category_orders

 px.scatter(i1, x="over", y="r_runs",animation_frame="over", category_orders={'over': ['1','2','3', '4','5','6', '7', '8', '9', '10', '11','12','13', '14','15','16', '17', '18', '19', '20']})

enter image description heretack.imgur.com/E534A.png

Hamster
  • 99
  • 1
  • 3
  • 7
  • 1
    What does your DataFrame look like? – Derek O Feb 10 '21 at 06:21
  • @Hamster Please provide a sample of your data as described [here](https://stackoverflow.com/questions/63163251/pandas-how-to-easily-share-a-sample-dataframe-using-df-to-dict/63163254#63163254) – vestland Feb 10 '21 at 12:26

0 Answers0