I need a help to write a Python 3 example code using Plotly to build the Variabily chart (JMP like) below with 3 categories. It shall not be limited to only 3 since it may have categories.
This chart uses only 3 levels where the “Fly time” might be plot in scatter or boxplot fashion.
The values “Initial Speed (kph)”, “Wind Direction” and “Field” are categorical and the response value is “Fly time” which is numeric.
How do I plot the graphic below including at least 3 levels (variables)?
Hi @marcelo ,
Welcome to the forum!
As far as I know this feature has not available on Plotly Python yet.
Even using plotly-2.27.0.min.js
version Plotly in javacript, I have tried and it has not implemented yet.
You can check previous post that discussing same topics.
Hi there
can I use mutlitcategory axis with more than two categories ?
I tried to enhance the previously posted example by adding an additional category (“2020”) but only two (2020 and BB+/BB) are shown in the chart . Am I missing something or is it not possible to have more categories ?
Thanks !
import plotly.graph_objects as go
x = [[“2020”, “2020”, “2020”, “2020”, “2020”, “2020”],
[“BB+”, “BB+”, “BB+”, “BB”, “BB”, “BB”],
[16, 17, 18, 16, 17, 18,]
]
fig = go.Figure()
fig.add_bar(x=x…
Here is an open issue about multicagory on github
opened 05:04PM - 20 Nov 17 UTC
type: feature
This is a request to add nested categorical axes. These are often used in "vari… ability charts", examples of which can be seen [here](https://stackoverflow.com/questions/43764586/how-do-i-make-nested-x-labels-like-a-jmp-variability-plot-but-using-ggplot2).
There's a few ways this could be implemented in practice. Rather than passing an array of values for `y` the user could pass an object like:
```
{
"popcorn": ["gourmet", "gourmet", "plain", ...]
"batch": ["large", "small", "large", ...]
...
}
```
or simply pass a category name / number (`1` or `"gourmet-large-little"`) and pass the nesting information for the axis in the layout section.
(I was surprised not to find an open issue for this -- it's possible that there is one but I didn't search using the right terms).
Edit: There is some limited support for this [as shown here](https://plot.ly/javascript/axes/#subcategory-axes) but it involves hacking the axis together by hand and would be difficult to use in an automated manner.
And you can maybe check the solution by richardnm-2
, from github Issues link above.
https://codepen.io/richardnm-2/pen/RwyjMrB .
1 Like
Thank you for sharing it, I am closing this post and watch that thread.
Sadly, I could not find that thread direct from Google. My apologies by opening a redudant one.