Bar Chart
Lollipop Chart Dark
Modern lollipop chart with neon accents
Output
Python
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(42)
categories = ['Product A', 'Product B', 'Product C', 'Product D', 'Product E',
'Product F', 'Product G', 'Product H']
values = np.random.randint(20, 95, len(categories))
sorted_idx = np.argsort(values)
categories = [categories[i] for i in sorted_idx]
values = values[sorted_idx]
fig, ax = plt.subplots(figsize=(10, 7), facecolor='#0a0a0f')
ax.set_facecolor('#0a0a0f')
y_pos = np.arange(len(categories))
# Stems
ax.hlines(y=y_pos, xmin=0, xmax=values, color='#27D3F5', alpha=0.6, linewidth=2)
# Dots
ax.scatter(values, y_pos, color='#27D3F5', s=120, zorder=3, edgecolor='#0a0a0f', linewidth=2)
# Value labels
for i, v in enumerate(values):
ax.text(v + 2, i, str(v), va='center', color='white', fontsize=10, fontweight='500')
ax.set_yticks(y_pos)
ax.set_yticklabels(categories, color='white', fontsize=10)
ax.set_xlim(0, 110)
ax.set_xlabel('Sales (K)', color='#888888', fontsize=11)
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['left'].set_color('#333333')
ax.spines['bottom'].set_color('#333333')
ax.tick_params(axis='x', colors='#888888', labelsize=9)
ax.xaxis.grid(True, color='#1a1a2e', linewidth=0.5, alpha=0.5)
ax.set_axisbelow(True)
ax.set_title('Product Sales Ranking', color='white', fontsize=14, fontweight='bold', pad=15)
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Basic Charts
More Bar Chart examples
☕