In plotly.py 3.x, I can no longer specify a dashed line by specifying a string of dash lengths. Before updating to version 3, I could do this.
From the docs for scatter -> line -> dash:
Sets the dash style of lines. Set to a dash type string ("solid", "dot", "dash", "longdash", "dashdot", or "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px").
The latter option no longer appears to be valid, yielding a ValueError. For example, the following does not work (tested in a Jupyter notebook):
import plotly.graph_objs as go
data = [
{
'y': [1,2,3],
'line': {
'dash': '5px,10px,2px,2px',
}
}
]
go.FigureWidget(data)
Hi @APlowman , thanks for the report!
I just opened an associated issue on the Plotly.js project to work out how we should handle this case. Check it out if you're interested in what went wronge here: https://github.com/plotly/plotly.js/issues/2903
Ok, looks like we'll handle this by introducing a custom LineDash validator class.
Fixed in #1136