How to stack multiple violin plots inside a 3d plot in python

Viewed 14

Hello and thank you in advance for any ideas. I have generated a large number (~126) of violin plots from a time-series dataset. I have three different classes that I'm interested in assessing through 8 different sensors. I would like to take the 3 classes of violin plots and stack them inside a 3d plot 8 times. Here is a sample of the kind of violin plots I'm working with, generated from the seaborn package in python:

enter image description here

enter image description here

enter image description here

Sample code for generating the violin plot is:

Classes:
p1 = dfp1.iloc[:,8]
p2 = dfp2.iloc[:,8]
p3 = dfp3.iloc[:,8]

Coil 2
fig, ax = pyplot.subplots(figsize=(17,7), dpi=200)
g = sns.violinplot(ax = ax, data = [p1,p2,p3])
plt.title("T: Coil 2 R: Coil 3")
g.set_xticklabels(['P1', 'P2', 'P3'])
g.set_xlabel("Class") 
g.set_ylabel("Amplitude (V) x$10^4$")
g.set_ylim([-3.8, 3.8])
0 Answers
Related