Layout attribute "template"
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- R
- Estrellas
- 2.7k
- Forks
- 641
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza por la entrada de layout/template de la referencia de figuras de R y compárala con la documentación enlazada de plantillas de Python. Determina si plotly.R ya expone el manejo de plantillas; se considera terminado cuando se documenta la sintaxis del argumento compatible o se identifican la implementación que falta y las pruebas necesarias para ella.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- r
- Área
- data-visualization
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100