Raincloud Plot
Employee Productivity by Work Mode
Output metrics across remote vs hybrid vs office
Output
Python
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import ptitprince as pt
np.random.seed(114)
BG_COLOR = '#0a0a0f'
TEXT_COLOR = 'white'
COLORS = ['#6CF527', '#F5B027', '#4927F5']
modes = ['Remote', 'Hybrid', 'Office']
data = pd.DataFrame({
'Productivity': np.concatenate([
np.random.normal(85, 15, 90),
np.random.normal(82, 12, 110),
np.random.normal(78, 18, 85)
]),
'Mode': ['Remote']*90 + ['Hybrid']*110 + ['Office']*85
})
fig, ax = plt.subplots(figsize=(10, 6), facecolor=BG_COLOR)
ax.set_facecolor(BG_COLOR)
pt.RainCloud(x='Mode', y='Productivity', data=data, palette=COLORS,
bw=.2, width_viol=.6, ax=ax, orient='h', alpha=.65,
dodge=True, pointplot=False, move=.2)
ax.set_xlabel('Productivity Index', fontsize=12, color=TEXT_COLOR, fontweight='500')
ax.set_ylabel('Work Mode', fontsize=12, color=TEXT_COLOR, fontweight='500')
ax.set_title('Employee Productivity by Work Mode', fontsize=14, color=TEXT_COLOR, fontweight='bold', pad=15)
ax.tick_params(colors='#888', labelsize=10)
for spine in ax.spines.values():
spine.set_color('#333')
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Statistical
More Raincloud Plot examples
☕