You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Layout properties specified through templates not applied on io.write_image() #62
Eg specifying a height and width as properties in a template for a figure and using the show() method renders the figure correctly, but write() method using kaleido defaults to plotly.io.kaleido.scope.default_height and default_width of 500x700, regardless of what is specified in the figure's template. Not tried with orca.
Easy fix is to re-specify figure dimensions again in io.write_image() call, but should this be necessary?
Thanks for the report @rom-burner. I talked about checking the template's layout width in #12, but looks like I didn't end up implementing that in #18.
See also plotly/plotly.py#2651 ... would be nice to just fix this everywhere and have the static renderers always honor layout.{width|height} falling back to layout.template.layout.{width|height}
Activity
jonmmease commentedon Dec 9, 2020
Thanks for the report @rom-burner. I talked about checking the template's layout width in #12, but looks like I didn't end up implementing that in #18.
I think we can handle this here
https://github.com/plotly/Kaleido/blob/76ff4d3b04d08f90a76a9e11478feeb5c95b0473/repos/kaleido/py/kaleido/scopes/plotly.py#L81-L82
As a workaround, do you get the template width/height if you set the scope's
default_widthanddefault_heighttoNoneglobally?nicolaskruchten commentedon Dec 10, 2020
See also plotly/plotly.py#2651 ... would be nice to just fix this everywhere and have the static renderers always honor
layout.{width|height}falling back tolayout.template.layout.{width|height}jonmmease commentedon Dec 10, 2020
Agreed