plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

ValueError: Invalid property specified for object of type plotly.graph_objs.layout.Shape: 'symbol'

Open apalkanau opened this issue 4 years ago • 2 comments

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_)

apalkanau avatar Aug 10 '22 13:08 apalkanau

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

apalkanau avatar Aug 23 '22 09:08 apalkanau

Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson

gvwilson avatar Jul 11 '24 14:07 gvwilson