Layout attribute "template"
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- R
- Star
- 2.7k
- Fork
- 641
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
After playing with plotly.py themes and templates options, I was wondering if it was possible to achieve the same result with plotly for R.
Although there is no themes available in R, I thought I could use the template options from the python themes and use them in a template in R.
In the plotly R figure reference, there is under "layout" the item "template" with the following description:
Parent: layout
Type: number or categorical coordinate string
Default attributes to be applied to the plot. Templates can be created from existing plots usingPlotly.makeTemplate, or created manually. They should be objects with format:{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}layoutTemplateandtraceTemplateare objects matching the attribute structure oflayoutand a data trace. Trace templates are applied cyclically to traces of each type. Container arrays (egannotations) have special handling: An object ending indefaults(egannotationdefaults) is applied to each array item. But if an item has atemplateitemnamekey we look in the template array for an item with matchingnameand apply that instead. If no matchingnameis found we mark the item invisible. Any named template item not referenced is appended to the end of the array, so you can use this for a watermark annotation or a logo image, for example. To omit one of these items on the plot, make an item with matchingtemplateitemnameandvisible: FALSE.
I have tried passing several possible argument to the template option of layout to no effect. Is there an option to use a template at the moment in plotly.R, and if so what is the proper syntax for the argument to pass?
Thank you very much for your help.
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 mục layout/template trong tài liệu tham chiếu về figure của R và so sánh mục này với tài liệu template Python được liên kết. Xác định xem plotly.R đã cung cấp khả năng xử lý template hay chưa; công việc được xem là hoàn thành khi либо cú pháp đối số được hỗ trợ được ghi lại, либо phần triển khai còn thiếu và các bài kiểm thử cần thiết được xác định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- r
- 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
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100