Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Announcing 3.3.0

I’m happy to announce that version 3.3.0 has been released and is available on PyPI and the plotly anaconda channel.

This version includes many new features and fixes including support for polar bar charts, stacked area charts, click-to-select, easy JSON export, pickle and deepcopy support, and more!

See the CHANGELOG for more details, or checkout the release notebook to see the new features in action.

As always, if you’re using in JupyterLab please pay careful attention to the versions of JupyterLab and associated extensions as listed in the README.

Happy plotting!

Since upgrading to plotly 3 my code creating offline plots is broken. I get the following error:
AttributeError: ‘Layout’ object has no attribute 'get’

I’m using a typical layout similar to examples posted on the website at
Just showing layout and the generation of the plot for brevity…

layout = go.Layout(
        hovermode = 'closest',
            family='Calibri, sans-serif',

        xaxis = dict(
            tickformat='%b-%Y', # 21-SEP-2017
        yaxis = dict(

layout.update(title='My Title')
figure = {'data':data_reqs, 'layout':layout}
plotly.offline.plot(figure, filename='html\chart_example.html', validate=False, auto_open=False)

It looks like I just need to wait for the website to update their examples. I looked through the migration guide and see there are a lot of changes to objects/structure. I’ll just stick to 2.7.0 for now.

Hi @robertpdx,

Glad you found your way to the migration guide. In this case, I think all you need to do is remove the validate=False argument.

We probably need to be clearer about this in the docstrings/documentation, but setting validate=False basically means “trust me, I’m passing in a dict with the right structure”. In this case you’re passing in figure as a dict but it includes a go.Layout object inside, and in version 3 the plotly.graph_objs objects are no longer dict subclasses. When validate=True (the default) will recurse down the structure and straighten this out.

Hope that helps!

Thank you! That did the trick.

I had turned off validation for a lazy way of dealing with empty data lists. I’ve fixed that now to skip any plots with data len of 0.

1 Like