enable setting px.scatter error bars of same color as the marker
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ả
I am making an error bar plot using px.scatter. I want to set each error bar to the same color as the marker. Below is the code showing how I am making the scatter plot. As can be seen from the code, I have a continuous scale and the markers are colored based on the column 'size' from my dataframe. I have looked quite a lot in the plotly documentation but I am unable to find a way to set the error bars of the same color as the marker. Is there a fix for this? Does plotly support different colored error bars for continuous data? Any help or suggestions would be appreciated.
I have also attached a link to the screenshot of the plot (the plot is zoomed in). As can be seen from the plot, the markers have colors based on the continuous scale whereas the all the lines have the same color.
df = pd.read_csv(options['file'], sep = ',')
size = df['size'].to_list()
fig = px.scatter(df,
x = "start",
y = "rank",
error_x = "duration",
render_mode = 'auto',
facet_row = 'api',
category_orders ={"api": ["MPIIO", "POSIX"]})
fig.update_traces(
marker = dict(
color= size,
colorscale = "portland",
colorbar=dict(
title = "Request Size <br>(Bytes)",
thickness=20
),
showscale=True
),
error_x = dict(
width = 0,
symmetric=False,
),
)
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
Tái hiện ví dụ px.scatter đã được báo cáo với màu marker liên tục và error_x được bật, bắt đầu từ các lệnh gọi px.scatter và fig.update_traces được nêu trong issue. Xác định xem Plotly có hỗ trợ ánh xạ màu marker liên tục lên các thanh sai số hay không, và coi công việc là hoàn tất khi ví dụ tạo ra các thanh sai số khớp với màu của từng marker hoặc khi hạn chế này được ghi lại kèm theo giải thích rõ ràng.
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
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- 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
- 35/100