plotly / plotly/plotly.R

Layout attribute "template"

オープン
#1,817 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
R
スター
2.7k
フォーク
641
PR マージ指標
30日以内にマージされた PR はありません

説明

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 using Plotly.makeTemplate, or created manually. They should be objects with format: {layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...} layoutTemplate and traceTemplate are objects matching the attribute structure of layout and a data trace. Trace templates are applied cyclically to traces of each type. Container arrays (eg annotations) have special handling: An object ending in defaults (eg annotationdefaults) is applied to each array item. But if an item has a templateitemname key we look in the template array for an item with matching name and apply that instead. If no matching name is 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 matching templateitemname and visible: 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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

R figure reference の layout/template エントリから始め、リンクされている Python template のドキュメントと比較します。plotly.R がすでに template の処理を公開しているかを確認します。完了条件は、サポートされている引数構文を文書化するか、不足している実装と必要なテストを特定することのいずれかです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
r
領域
data-visualization
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。