title_font broken within template layouts
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- jupyter-notebook, python
- Lĩnh vực
- data-visualization
Hướng nghiên cứu
Chạy ví dụ Python được cung cấp trong Jupyter và so sánh hình dựa trên template với ví dụ update_layout trực tiếp. Theo dõi pio.to_templated, pio.templates và các đường dẫn layout của title_font/title.font để tìm ra lý do template không giữ lại phông chữ. Hoàn tất khi ví dụ template hiển thị tiêu đề bằng Times New Roman và ví dụ tài liệu được liên kết hoạt động trở lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Setting title font of a figure via templates has stopped working - including the example The template layout property which simply makes the title Rockwell in Size 24.
The example below should show (in Jupyter) a blank plot with a title in Times New Roman
import plotly.express as px
import plotly.io as pio
import plotly.graph_objs as go
# we create a figure with a layout, where we only change the title_font
fig = go.Figure(layout=dict(title_font=dict(family="Times New Roman", size=24)))
# create a test template
pio.templates["test_template"] = pio.to_templated(fig).layout.template
# show a blank plot with just a title to show the template won't pull in title_font data
px.line(title="This Should Be Times New Roman", template="test_template").show()
It doesn't make a difference if we use full dictionary or magic underscore notation
title=dict(font=dict(family="Times New Roman"))
title_font=dict(family="Times New Roman")
** However **
Updating the layout of a figure, not using the template, does still work, for example
# build fig with template
# use the fig.update_layout() to update title font in layout
# This will have a title in Times New Roman
fig = px.line(title="This IS Times New Roman", template="test_template")
fig = fig.update_layout(title_font={'family':'Times New Roman'}).show()
Thank you for a great tool!
- 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
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.
Issue khác của plotly/plotly.py
-
P3 size: 1 task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug P1
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
-
feature P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
feature P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Tất cả issue của plotly/plotly.py
Issue tương tự
-
area/auth bug comp/agent P3 platform/discord type/security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#117848 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
bancolombia/sentinel#23 ·
-
test md Đang mởCI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100