Update risk_matrix_example.py

This commit is contained in:
Omar Santos 2023-12-28 19:17:18 -05:00 committed by GitHub
parent 6046fdae6f
commit e68eeee01c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,15 +22,15 @@ labels = list(risks.keys())
# Create the plot # Create the plot
plt.figure(figsize=(8, 6)) plt.figure(figsize=(8, 6))
plt.scatter(x, y, color='blue') plt.scatter(x, y, color='blue')
plt.title('AI System Risk Matrix') plt.title('AI System Risk Matrix', fontsize=18)
plt.xlabel('Likelihood') plt.xlabel('Likelihood', fontsize=14)
plt.ylabel('Impact') plt.ylabel('Impact', fontsize=14)
plt.xticks([1, 2, 3, 4], ['Low', 'Medium', 'High', 'Very High']) plt.xticks([1, 2, 3, 4], ['Low', 'Medium', 'High', 'Very High'], fontsize=14)
plt.yticks([1, 2, 3, 4], ['Low', 'Medium', 'High', 'Very High']) plt.yticks([1, 2, 3, 4], ['Low', 'Medium', 'High', 'Very High'], fontsize=14)
plt.grid(True) plt.grid(True)
# Annotate the points # Annotate the points with larger font
for i, label in enumerate(labels): for i, label in enumerate(labels):
plt.annotate(label, (x[i], y[i])) plt.annotate(label, (x[i], y[i]), fontsize=14)
plt.show() plt.show()