Polar Chart

IoT Sensor Network Status

Polar radar visualization showing IoT sensor health and connectivity metrics across a smart building network.

Output
IoT Sensor Network Status
Python
import matplotlib.pyplot as plt
import numpy as np

# IoT sensor network metrics
categories = ['Temperature', 'Humidity', 'Motion', 'Light', 'CO2', 
              'Pressure', 'Sound', 'Vibration']
values = [92, 88, 95, 78, 85, 91, 72, 89]

# Prepare angles
angles = np.linspace(0, 2 * np.pi, len(categories), endpoint=False).tolist()
values_plot = values + [values[0]]
angles += angles[:1]

# Light theme
fig, ax = plt.subplots(figsize=(10, 10), subplot_kw=dict(polar=True), facecolor='#ffffff')
ax.set_facecolor('#ffffff')

# Fill area with gradient effect
ax.fill(angles, values_plot, color='#27F5B0', alpha=0.25)
ax.plot(angles, values_plot, color='#27F5B0', linewidth=2.5)

# Add threshold circle at 80%
threshold = [80] * (len(categories) + 1)
ax.plot(angles, threshold, color='#F5276C', linestyle='--', linewidth=1.5, alpha=0.7, label='Threshold')

# Scatter points
ax.scatter(angles[:-1], values, color='#22c55e', s=100, zorder=5, edgecolors='white', linewidth=2)

# Styling
ax.set_ylim(0, 100)
ax.set_xticks(angles[:-1])
ax.set_xticklabels(categories, fontsize=11, color='#1f2937', fontweight='500')
ax.set_yticks([25, 50, 75, 100])
ax.set_yticklabels(['25%', '50%', '75%', '100%'], fontsize=9, color='#6b7280')

ax.spines['polar'].set_color('#e5e7eb')
ax.grid(color='#e5e7eb', linewidth=0.8)
ax.tick_params(colors='#374151')

ax.set_title('IoT Sensor Network Health Status', fontsize=16, color='#1f2937', fontweight='bold', pad=25)
ax.legend(loc='upper right', bbox_to_anchor=(1.15, 1.1), frameon=False)

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Part-to-Whole

Did this help you?

Support PyLucid to keep it free & growing

Support