Adding aspectmode='cube'
to the scene appears to raise a ValueError
exception:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-10-611837ba12e9> in <module>()
34 yaxis = dict(title=y.name, range = [0,6]),
35 zaxis = dict(title=z.name, range = [0,6]),
---> 36 aspectratio='cube')
37 )
38 fig = go.Figure(data=pdata, layout=layout)
~/anaconda3/lib/python3.6/site-packages/plotly/graph_objs/_layout.py in __init__(self, arg, angularaxis, annotations, autosize, bargap, bargroupgap, barmode, barnorm, boxgap, boxgroupgap, boxmode, calendar, clickmode, colorway, datarevision, direction, dragmode, extendpiecolors, font, geo, grid, height, hiddenlabels, hiddenlabelssrc, hidesources, hoverdistance, hoverlabel, hovermode, images, legend, mapbox, margin, orientation, paper_bgcolor, piecolorway, plot_bgcolor, polar, radialaxis, scene, selectdirection, separators, shapes, showlegend, sliders, spikedistance, template, ternary, title, titlefont, updatemenus, violingap, violingroupgap, violinmode, width, xaxis, yaxis, **kwargs)
3995 self['radialaxis'] = radialaxis if radialaxis is not None else _v
3996 _v = arg.pop('scene', None)
-> 3997 self['scene'] = scene if scene is not None else _v
3998 _v = arg.pop('selectdirection', None)
3999 self['selectdirection'
~/anaconda3/lib/python3.6/site-packages/plotly/basedatatypes.py in __setitem__(self, prop, value)
3692 if match is None:
3693 # Set as ordinary property
-> 3694 super(BaseLayoutHierarchyType, self).__setitem__(prop, value)
3695 else:
3696 # Set as subplotid property
~/anaconda3/lib/python3.6/site-packages/plotly/basedatatypes.py in __setitem__(self, prop, value)
2764 # ### Handle compound property ###
2765 if isinstance(validator, CompoundValidator):
-> 2766 self._set_compound_prop(prop, value)
2767
2768 # ### Handle compound array property ###
~/anaconda3/lib/python3.6/site-packages/plotly/basedatatypes.py in _set_compound_prop(self, prop, val)
3068 validator = self._validators.get(prop)
3069 # type: BasePlotlyType
-> 3070 val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
3071
3072 # Save deep copies of current and new states
~/anaconda3/lib/python3.6/site-packages/_plotly_utils/basevalidators.py in validate_coerce(self, v, skip_invalid)
1909
1910 elif isinstance(v, dict):
-> 1911 v = self.data_class(skip_invalid=skip_invalid, **v)
1912
1913 elif isinstance(v, self.data_class):
~/anaconda3/lib/python3.6/site-packages/plotly/graph_objs/layout/_scene.py in __init__(self, arg, annotations, aspectmode, aspectratio, bgcolor, camera, domain, dragmode, hovermode, xaxis, yaxis, zaxis, **kwargs)
1493 self['aspectmode'] = aspectmode if aspectmode is not None else _v
1494 _v = arg.pop('aspectratio', None)
-> 1495 self['aspectratio'] = aspectratio if aspectratio is not None else _v
1496 _v = arg.pop('bgcolor', None)
1497 self['bgcolor'] = bgcolor if bgcolor is not None else _v
~/anaconda3/lib/python3.6/site-packages/plotly/basedatatypes.py in __setitem__(self, prop, value)
2764 # ### Handle compound property ###
2765 if isinstance(validator, CompoundValidator):
-> 2766 self._set_compound_prop(prop, value)
2767
2768 # ### Handle compound array property ###
~/anaconda3/lib/python3.6/site-packages/plotly/basedatatypes.py in _set_compound_prop(self, prop, val)
3068 validator = self._validators.get(prop)
3069 # type: BasePlotlyType
-> 3070 val = validator.validate_coerce(val, skip_invalid=self._skip_invalid)
3071
3072 # Save deep copies of current and new states
~/anaconda3/lib/python3.6/site-packages/_plotly_utils/basevalidators.py in validate_coerce(self, v, skip_invalid)
1918 v = self.data_class()
1919 else:
-> 1920 self.raise_invalid_val(v)
1921
1922 v._plotly_name = self.plotly_name
~/anaconda3/lib/python3.6/site-packages/_plotly_utils/basevalidators.py in raise_invalid_val(self, v)
242 typ=type_str(v),
243 v=repr(v),
--> 244 valid_clr_desc=self.description()))
245
246 def raise_invalid_elements(self, invalid_els):
ValueError:
Invalid value of type 'builtins.str' received for the 'aspectratio' property of layout.scene
Received value: 'cube'
The 'aspectratio' property is an instance of Aspectratio
that may be specified as:
- An instance of plotly.graph_objs.layout.scene.Aspectratio
- A dict of string/value properties that will be passed
to the Aspectratio constructor
Supported dict properties:
x
y
z