I am supporting users on a Plotly on-prem instance.
We are using plotly in conjunction with jupyter notebooks, generating plotly figures inside the notebooks. It works really well. But, values passed inside the
layout variable sent to iplot are ignored. Specifically,
xaxis labels are not being rendered.
The figure below shows an example of the bug on a scatter plot example.
Is this a known limitation of working within jupyter notebooks? Is there another way to render title and axis labels?
I solved the issue by downgrading plotly.py.
pip install plotly==3.4
I think this is probably a consequence of a change that plotly.js made in version 1.43, that plotly.py adapted to in version 3.5.0. Basically the underlying JSON structure for the
title attributes changed to support additional title properties (alignment, position, etc.). See https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md#changed.
Plotly.js maintained compatibility with the old format, and so did plotly.py. But in version 3.5.0 plotly.py started translating the old format into the new format.
My guess is that the version of plotly.js that is included in your current version of ‘Plotly on-prem’ is < 1.43, which doesn’t recognize the new format. If this is the case, then you’ll need to stay on plotly.py 3.4 until your on-prem installation is updated.
Hope that helps clear things up a bit,