Skip to content

pio.to_templated not behaving as expected #1920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
emmanuelle opened this issue Nov 22, 2019 · 4 comments
Closed

pio.to_templated not behaving as expected #1920

emmanuelle opened this issue Nov 22, 2019 · 4 comments

Comments

@emmanuelle
Copy link
Contributor

>>> fig = go.Figure(layout={'title': 'Figure Title', 'font': {'size': 20, 'family': 'Courier'}})                                             
>>> fig                                                                                                                                      
Figure({
    'data': [],
    'layout': {'font': {'family': 'Courier', 'size': 20}, 'template': '...', 'title': {'text': 'Figure Title'}}
})
>>> pio.to_templated(fig)                                                                                                                    
Figure({
    'data': [], 'layout': {'template': '...', 'title': {'text': 'Figure Title'}}
})

The style properties should go to the template I think?

@nicolaskruchten
Copy link
Contributor

This is working as intended, it's just that template is suppressed in the output AND your figure also has the default template on board... Here's another way of looking at it:

image

@nicolaskruchten
Copy link
Contributor

Also we should document pio.to_templated() in https://plot.ly/python/templates/ :)

@emmanuelle
Copy link
Contributor Author

Got it, thanks. I got confused by the fact that the template is suppressed in the output (which is a good thing!). I'll let this one open until we document the feature.

@gvwilson
Copy link
Contributor

Hi - we are currently trying to tidy up Plotly's public repositories to help us focus our efforts on things that will help users most. Since this issue has been sitting for several years, I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our backlog. Thanks for your help - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants