Plotting fill patterns in plotly

TLDR: fillpattern wasn’t added until plotly v5.7 and we use plotly v4.14

plotly.py/CHANGELOG.md at doc-prod · plotly/plotly.py · GitHub


More context:

Client:
Anvil’s client side plotly is based off of python plotly version 4.14.

Server:

  • Basic Python 3: equivalent to client side plotly in every way
  • Full Python 3: uses plotly v4.14.3
  • Python 3.10 (beta): uses plotly v5.11.0

I assume you’re using the Basic Python 3 on the server - hence the issue with add_trace not being callable.

If you use the Full Python 3 you’ll get an error since Plotly 4.14.3 doesn’t know about fillpattern.

If you use the Python 3.10 beta, you won’t get an error, but the client still needs to render the plot. And since the client version of Plotly is based on v4.14 it will just ignore the fillpattern argument.

Basically you’re stuck with rendering v4.14.3 features until we upgrade to plotly 5.

You might want to add some likes to this feature request: