3D Bar Chart

Carbon Capture Efficiency

CO2 capture rates across facilities and technologies

Output
Carbon Capture Efficiency
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='#ffffff')
ax = fig.add_subplot(111, projection='3d')
ax.set_facecolor('#ffffff')

facilities = 5
tech = 4
xpos = np.arange(facilities)
zpos = np.arange(tech)
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(888)
dy = np.clip(np.random.beta(4, 2, size=20) * 100, 30, 95)

cmap = LinearSegmentedColormap.from_list('neon', ['#9C2007', '#F5B027', '#6CF527', '#27F5B0'])
norm = plt.Normalize(30, 95)
colors = [cmap(norm(v)) for v in dy]

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

ax.set_xlabel('Facility', fontsize=11, color='#1f2937', labelpad=12)
ax.set_ylabel('Efficiency (%)', fontsize=11, color='#1f2937', labelpad=12)
ax.set_zlabel('Technology', fontsize=11, color='#1f2937', labelpad=10)
ax.set_title('Carbon Capture Technology Performance', fontsize=14, color='#1f2937', fontweight='bold', pad=20)

ax.set_xticks(range(5))
ax.set_xticklabels(['Plant-A', 'Plant-B', 'Plant-C', 'Plant-D', 'Plant-E'], fontsize=7, color='#374151')
ax.set_zticks(range(4))
ax.set_zticklabels(['Amine', 'Membrane', 'DAC', 'Cryogenic'], fontsize=7, color='#374151')
ax.tick_params(colors='#374151', labelsize=9)

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

ax.view_init(elev=20, azim=55)
plt.tight_layout()
plt.show()
Library

Matplotlib

Category

3D Charts

Did this help you?

Support PyLucid to keep it free & growing

Support