3D Bar Chart

Cryptocurrency Mining Hash

Hash rates across mining pools and hardware configurations

Output
Cryptocurrency Mining Hash
Python
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
from matplotlib.colors import LinearSegmentedColormap

fig = plt.figure(figsize=(12, 8), facecolor='#0d1117')
ax = fig.add_subplot(111, projection='3d')
ax.set_facecolor('#0d1117')

pools = 5
hardware = 4
xpos = np.arange(pools)
zpos = np.arange(hardware)
xpos, zpos = np.meshgrid(xpos, zpos)
xpos = xpos.flatten()
zpos = zpos.flatten()
ypos = np.zeros_like(xpos)

dx = 0.6
dz = 0.6
np.random.seed(999)
hw_multiplier = [1.0, 1.5, 2.2, 3.0]
dy = np.array([np.random.normal(100, 15) * hw_multiplier[i // 5] for i in range(20)])

cmap = LinearSegmentedColormap.from_list('neon', ['#F5B027', '#F5D327', '#6CF527', '#27D3F5'])
norm = plt.Normalize(min(dy), max(dy))
colors = [cmap(norm(v)) for v in dy]

ax.bar3d(xpos, ypos, zpos, dx, dy, dz, color=colors, alpha=0.85, edgecolor='#1a1a2e', linewidth=0.4)

ax.set_xlabel('Mining Pool', fontsize=11, color='white', labelpad=12)
ax.set_ylabel('Hash Rate (TH/s)', fontsize=11, color='white', labelpad=12)
ax.set_zlabel('Hardware', fontsize=11, color='white', labelpad=10)
ax.set_title('Crypto Mining Hash Rate Distribution', fontsize=14, color='white', fontweight='bold', pad=20)

ax.set_xticks(range(5))
ax.set_xticklabels(['Pool-A', 'Pool-B', 'Pool-C', 'Pool-D', 'Pool-E'], fontsize=8, color='#888888')
ax.set_zticks(range(4))
ax.set_zticklabels(['S19', 'S19 Pro', 'S19 XP', 'S21'], fontsize=8, color='#888888')
ax.tick_params(colors='#888888', labelsize=9)

ax.xaxis.pane.fill = False
ax.yaxis.pane.fill = False
ax.zaxis.pane.fill = False
ax.xaxis.pane.set_edgecolor('#333333')
ax.yaxis.pane.set_edgecolor('#333333')
ax.zaxis.pane.set_edgecolor('#333333')
ax.grid(True, alpha=0.2, linewidth=0.5)

ax.view_init(elev=25, azim=40)
plt.tight_layout()
plt.show()
Library

Matplotlib

Category

3D Charts

Did this help you?

Support PyLucid to keep it free & growing

Support