3D Scatter
Supply Chain Network Distribution
Logistics network visualization showing warehouses, distribution centers, and retail locations.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(147)
# Supply chain nodes
n_nodes = 100
# Geographic distribution
longitude = np.random.uniform(-120, -70, n_nodes)
latitude = np.random.uniform(25, 50, n_nodes)
# Throughput (vertical axis)
throughput = np.random.exponential(500, n_nodes) + 100 # Units per day
# Node type
node_type = np.random.choice(['warehouse', 'distribution', 'retail'], n_nodes, p=[0.2, 0.3, 0.5])
colors = {'warehouse': '#4927F5', 'distribution': '#27D3F5', 'retail': '#6CF527'}
sizes = {'warehouse': 100, 'distribution': 60, 'retail': 30}
point_colors = [colors[t] for t in node_type]
point_sizes = [sizes[t] for t in node_type]
fig = plt.figure(figsize=(10, 8), facecolor='#ffffff')
ax = fig.add_subplot(111, projection='3d', facecolor='#ffffff')
ax.scatter(longitude, latitude, throughput, c=point_colors, s=point_sizes,
alpha=0.7, edgecolors='#374151', linewidths=0.3)
ax.set_xlabel('Longitude', color='#1f2937', fontsize=10)
ax.set_ylabel('Latitude', color='#1f2937', fontsize=10)
ax.set_zlabel('Throughput (units/day)', color='#1f2937', fontsize=10)
ax.set_title('Supply Chain Network Distribution', color='#1f2937', fontsize=14, fontweight='bold', pad=20)
ax.tick_params(colors='#6b7280', labelsize=8)
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.view_init(elev=25, azim=45)
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
3D Charts
☕