Bar Chart
Icon Bar Chart
Horizontal bars with emoji icons for categories.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
COLORS = {
'bars': ['#6366F1', '#10B981', '#F59E0B', '#EF4444'],
'background': '#FFFFFF',
'text': '#1E293B',
'text_muted': '#64748B',
'grid': '#F1F5F9',
}
categories = ['Desktop', 'Mobile', 'Tablet', 'Other']
values = [45, 35, 15, 5]
icons = ['🖥️', '📱', '⌨️', '🔌']
fig, ax = plt.subplots(figsize=(10, 5), dpi=100)
ax.set_facecolor(COLORS['background'])
fig.patch.set_facecolor(COLORS['background'])
y = np.arange(len(categories))
for i, (v, c, icon) in enumerate(zip(values, COLORS['bars'], icons)):
ax.barh(i, v, height=0.5, color=c, alpha=0.85, edgecolor='white', linewidth=2)
ax.text(-8, i, icon, ha='center', va='center', fontsize=20)
ax.text(v + 2, i, f'{v}%', ha='left', va='center', fontsize=10,
fontweight='bold', color=COLORS['text'])
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['left'].set_visible(False)
ax.spines['bottom'].set_visible(False)
ax.tick_params(left=False, labelleft=False, bottom=False, labelbottom=False)
ax.set_xlim(-15, 60)
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Basic Charts
More Bar Chart examples
☕