santosjorge / cufflinks

Productivity Tools for Plotly + Pandas
MIT License
3.02k stars 675 forks source link

Update _set_axis(): fix layout property deletion bug #251

Open rightx2 opened 4 years ago

rightx2 commented 4 years ago

fig['layout'] in _set_axis(), which is an object of plotly.graph_objs.Layout should not be used with del because the class and its all parent classes do not implement __delitem__. So, it will raise AttributeError: __delitem__ instead of KeyError.

So, I fixed it by accessing _props directly. But it might not look good because the underscore + property is usually called inside of an instance method, not the outside of the object. Any comments or fixes will be welcomed!