modeBarButtonsToAdd doesn’t appear to be working as intended
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ả
Using "modeBarButtonsToAdd" to add buttons for interactive annotations and shape drawing in plotly figures, it prevents the HTML plot to be shown at all with plotly.offline rendering!
import plotly.offline as offline
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df, x='petal_width', y='sepal_length', color='species')
fig.update_layout(
dragmode='drawopenpath',
newshape_line_color='cyan',
title_text='Draw a path to separate versicolor and virginica'
)
config = dict({'scrollZoom': True,'displaylogo': False, 'modeBarButtonsToAdd':['drawline','drawopenpath','drawcircle','drawrect','eraseshape']})
offline.plot(fig,
auto_open=True, image = None, config =config,
filename='./foo.html', include_plotlyjs='directory')
If the 'modeBarButtonsToAdd':[ ] is emptied, the HTML is correctly rendered again. Any idea with this weird behaviour?
Please, see also https://eoss-image-processing.github.io/2020/05/06/shape-drawing.html
Environment:
Python 3.7
Plotly 4.14.1
dash 1.18.1
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 chạy bản tái hiện Python được cung cấp với plotly.offline.plot và cấu hình modeBarButtonsToAdd, rồi so sánh với một danh sách nút rỗng. Theo dõi quá trình tạo HTML ngoại tuyến và xác minh rằng đầu ra được render thành công khi các nút vẽ được bật; sử dụng môi trường Python 3.7 và Plotly 4.14.1 được báo cáo khi kiểm tra hành vi.
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
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100