Untitled

 avatar
unknown
plain_text
7 days ago
1.0 kB
0
Indexable
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches

# Define the stages of the process
stages = ['Pengajuan', 'Verifikasi', 'Evaluasi', 'Penetapan', 'Penerbitan']
colors = ['#FF9999', '#66B3FF', '#99FF99', '#FFCC99', '#FFD700']

# Create a figure and axis
fig, ax = plt.subplots(figsize=(10, 6))

# Create a timeline
for i, stage in enumerate(stages):
    ax.barh(0, 1, left=i, color=colors[i], edgecolor='black')
    ax.text(i + 0.5, 0, stage, ha='center', va='center', color='black', fontsize=10)

# Add labels and title
ax.set_yticks([])
ax.set_xticks(range(len(stages)))
ax.set_xticklabels([])
ax.set_xlim(0, len(stages))
ax.set_title('Proses Permohonan dan Penetapan Permohonan IP', fontsize=14, fontweight='bold')

# Add a legend
patches = [mpatches.Patch(color=colors[i], label=stages[i]) for i in range(len(stages))]
ax.legend(handles=patches, loc='upper center', bbox_to_anchor=(0.5, -0.05), ncol=len(stages))

# Improve layout
plt.tight_layout()
plt.show()
Leave a Comment