Raincloud Plot
App Download Speed by Platform
Download performance across app stores
Output
Python
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import ptitprince as pt
np.random.seed(202)
BG_COLOR = '#ffffff'
TEXT_COLOR = '#1f2937'
COLORS = ['#27D3F5', '#6CF527', '#F5B027']
platforms = ['iOS', 'Android', 'Windows']
data = pd.DataFrame({
'Speed': np.concatenate([
np.random.gamma(5, 8, 100),
np.random.gamma(4, 10, 110),
np.random.gamma(3.5, 12, 90)
]),
'Platform': ['iOS']*100 + ['Android']*110 + ['Windows']*90
})
fig, ax = plt.subplots(figsize=(10, 6), facecolor=BG_COLOR)
ax.set_facecolor(BG_COLOR)
pt.RainCloud(x='Platform', y='Speed', data=data, palette=COLORS,
bw=.2, width_viol=.6, ax=ax, orient='h', alpha=.65,
dodge=True, pointplot=False, move=.2)
ax.set_xlabel('Download Speed (MB/s)', fontsize=12, color=TEXT_COLOR, fontweight='500')
ax.set_ylabel('Platform', fontsize=12, color=TEXT_COLOR, fontweight='500')
ax.set_title('App Download Speed by Platform', fontsize=14, color=TEXT_COLOR, fontweight='bold', pad=15)
ax.tick_params(colors='#374151', labelsize=10)
for spine in ax.spines.values():
spine.set_color('#e5e7eb')
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Statistical
More Raincloud Plot examples
☕