Going through the discussion in this thread: #217
We can add template functionality to the API Libraries. Some pointers:
py.plot(fig, template='ggplot'). Template can be a keyword ( 'ggplot', 'seaborn' etc.) or a Figure instance. This way a user can copy the theme from an existing chart the user has access to (which many people have been asking about, in support queries).
- Copying the template from an existing Plotly chart will only work in online mode (inbuilt template can be used offline as well).
- saving user's custom templates as JSON in
.plotly/user_templates directory, and built-in templates in .plotly/plotly_templates directory.
- Adding new built-in templates will require a valid
template.json and a reference in a templates.py file.
- A Template Parser, which will load template files, and convert them to
Figure or Layout objects (basically deserialize them).
- A deep
update method, which can work on Plotly's Graph Objects (as a utility method).
@cldougl @jackparmer @theengineear : please provide comments/suggestions ..
Going through the discussion in this thread: #217
We can add template functionality to the API Libraries. Some pointers:
py.plot(fig, template='ggplot'). Template can be a keyword ( 'ggplot', 'seaborn' etc.) or aFigureinstance. This way a user can copy the theme from an existing chart the user has access to (which many people have been asking about, in support queries)..plotly/user_templatesdirectory, and built-in templates in.plotly/plotly_templatesdirectory.template.jsonand a reference in atemplates.pyfile.FigureorLayoutobjects (basically deserialize them).updatemethod, which can work on Plotly's Graph Objects (as a utility method).@cldougl @jackparmer @theengineear : please provide comments/suggestions ..