✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Scatterpolar Not Available?

Hey there,

I’ve checked the forum here, and don’t see anything related for the Python API.

I’m working from the docs (https://plot.ly/python/polar-chart/) to create a polar chart.

The code is:
import plotly.plotly as py
import plotly.graph_objs as go

data = [
    go.Scatterpolar(
        r = [0.5,1,2,2.5,3,4],
        theta = [35,70,120,155,205,240],
        mode = 'markers',
        marker = dict(
            color = 'peru'
        )
    )
]

layout = go.Layout(
    showlegend = False
)

fig = go.Figure(data=data, layout=layout)
py.iplot(fig, filename = 'polar/basic')

This gives a result
AttributeError: module ‘plotly.graph_objs’ has no attribute ‘Scatterpolar’

I also ran an update to the library:
pip3 install --upgrade plotly
Collecting plotly
Downloading plotly-2.5.1.tar.gz (24.9MB)

from plotly import __version__
print(__version__)

Gives “2.2.3”
Am I missing something obvious? Is the Scatterpolar graph available?

Thanks!
Ken

I think you need version 2.4

Thanks! Now I’m trying to figure out why pip upgrade to 2.5 didn’t affect my version number in jupyter notebook.

Solved!

I had to upgrade pip (pip install --upgrade pip)
Then upgrade plotly again (pip install --upgrade plotly)
Then restart the notebook kernel.

Now I’m getting 2.5.1 as the version and the graph is showing properly.

Thanks!