plotly.py
plotly.py copied to clipboard
ValueError: Invalid property specified for object of type plotly.graph_objs.layout.Shape: 'symbol'
Reproducible example:
import matplotlib.pyplot as plt
from plotly import tools
fig, ax = plt.subplots()
ax.plot([0, 1], [0, 1], "s-", label="foo")
ax.legend()
tools.mpl_to_plotly(fig)
Works fine without legend or explicit fmt.
This issue is quite severe because it disallows to use some sklearn visualizations:
from sklearn.calibration import CalibrationDisplay
from plotly import tools
display = CalibrationDisplay.from_predictions([1], [0.9])
tools.mpl_to_plotly(display.figure_)
Cannot reproduce the same error with the latest version of matplotlib, but receiving
ValueError: Invalid value of type 'builtins.str' received for the 'dash' property of layout.shape.line Received value: '1.5px,2.4749999999999996px'
The 'dash' property is a string and must be specified as: - One of the following strings: ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] - A number that will be converted to a string
instead
I cannot use matplotlib 2.x because it's deprecated and I'm using python 3.8