Error bars in px.scatter should inherit color and opacity from markers by default
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 18.8k
- Fork
- 2.8k
- Merge trung bình
- 16 giờ 26 phút
- Pull request đã merge (30 ngày)
- 21
Mô tả
Error bars do correctly show with the same color (not opacity) as markers when using categorical data to set the color parameter:
import plotly.express as px
df = px.data.iris()
df["e_plus"] = df["sepal_width"]/100
df["e_minus"] = df["sepal_width"]/40
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species",
error_y="e_plus", error_y_minus="e_minus")
fig.show()
However, setting the opacity parameter only changes the opacity of the markers:
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species",
error_y="e_plus", error_y_minus="e_minus", opacity=0.6)
fig.show()
And using numerical data to set the color parameter, the error bars will not have the same color as the markers, but instead renders in black:
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="petal_width",
error_y="e_plus", error_y_minus="e_minus")
fig.show()
Fixing this would be super helpful, since the only current solution seems to be to manually add or update the trace for every single data point to set rgba-values for the error bars. My scatter plot had a few thousand data points, making that a very time consuming for-loop.
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 với các bản tái hiện px.scatter được cung cấp bằng cách sử dụng các giá trị màu phân loại và số, có và không có độ mờ. Kiểm tra các thiết lập thanh lỗi và marker được tạo ra để xác định nơi màu và độ mờ của chúng khác nhau. Được xem là hoàn thành khi các thanh lỗi mặc định kế thừa màu và độ mờ của marker trong tất cả các trường hợp được trình bày, với độ bao phủ cho các bản tái hiện.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- data-visualization
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 45/100