plotly.py
plotly.py copied to clipboard
Violin plot `quartilemethod` arg in docs, but not library
The violin plot docs mention Choosing The Algorithm For Computing Quartiles and "New in 5.1.0"
However, if you run the example code in 5.3.1 it errors
Version
$ pip show plotly
Name: plotly
Version: 5.3.1
Example
This is the code in the docs
import plotly.express as px
df = px.data.tips()
fig = px.violin(df, y="total_bill")
fig.update_traces(quartilemethod="exclusive") # or "inclusive", or "linear" by default
fig.show()
Trace
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-1-3ff9e9f5ce1b> in <module>
3 df = px.data.tips()
4 fig = px.violin(df, y="total_bill")
----> 5 fig.update_traces(quartilemethod="exclusive") # or "inclusive", or "linear" by default
6
7 fig.show()
~/.pyenv/versions/3.7.12/envs/aiqc_dev/lib/python3.7/site-packages/plotly/basedatatypes.py in update_traces(self, patch, selector, row, col, secondary_y, overwrite, **kwargs)
1374 selector=selector, row=row, col=col, secondary_y=secondary_y
1375 ):
-> 1376 trace.update(patch, overwrite=overwrite, **kwargs)
1377 return self
1378
~/.pyenv/versions/3.7.12/envs/aiqc_dev/lib/python3.7/site-packages/plotly/basedatatypes.py in update(self, dict1, overwrite, **kwargs)
5080 with self.figure.batch_update():
5081 BaseFigure._perform_update(self, dict1, overwrite=overwrite)
-> 5082 BaseFigure._perform_update(self, kwargs, overwrite=overwrite)
5083 else:
5084 BaseFigure._perform_update(self, dict1, overwrite=overwrite)
~/.pyenv/versions/3.7.12/envs/aiqc_dev/lib/python3.7/site-packages/plotly/basedatatypes.py in _perform_update(plotly_obj, update_obj, overwrite)
3875 # contain the _raise_on_invalid_property_error
3876 # generated message
-> 3877 raise err
3878
3879 # Convert update_obj to dict
ValueError: Invalid property specified for object of type plotly.graph_objs.Violin: 'quartilemethod'
Did you mean "scalemode"?
Valid properties:
alignmentgroup
Set several traces linked to the same position axis or
matching axes to the same alignmentgroup. This controls
whether bars compute their positional range dependently
or independently.
bandwidth
Sets the bandwidth used to compute the kernel density
estimate. By default, the bandwidth is determined by
Silverman's rule of thumb.
box
:class:`plotly.graph_objects.violin.Box` instance or
dict with compatible properties
...
Did you mean "scalemode"?
Bad property path:
quartilemethod
^^^^^^^^^^^^^^