enable global consistency of color mapping between animation frames
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 18.3k
- Fork
- 2k
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 28
Mô tả
Hi, Thanks for this AWESOME project. I really enjoy using it.
The animation function can't keep the global consistency of color mapping between animation frames.
Here is an example in Colab for my use case. In this example, I use Plotly.py with scatter_geo API. My code is as between,
import plotly.express as px
df = px.data.gapminder()
fig = px.scatter_geo(df, locations="iso_alpha",
color="lifeExp",
hover_name="country",
size="pop",
animation_frame="year",
projection="natural earth")
fig.show()
I expect the color mapping for lifeExp to keep consistent between different frames, which means the same color among frames should represent the same lifeExp value and the color bar should keep the same too. But the result looks like below, in which the frames in 1952 and 1997 can't be comparable.
I would expect some API like,
fig = px.scatter_geo(df, locations="iso_alpha",
color="lifeExp",
keep_color_global_consistency = True,
hover_name="country",
size="pop",
animation_frame="year",
projection="natural earth")
eg, it has keep_color_global_consistency option and the default value should be True.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện ví dụ Colab được liên kết với scatter_geo, color và animation_frame. Đọc cách ánh xạ màu và các thanh màu được xử lý giữa các frame của animation, sau đó xác định hành vi của API để các giá trị bằng nhau sử dụng các màu có thể so sánh và thanh màu luôn cố định; hoàn thành khi các frame năm 1952 và 1997 có thể được so sánh trực tiếp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, python
- Lĩnh vực
- data-visualization
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100