mirror of
https://github.com/permissionlesstech/georelays.git
synced 2026-07-25 20:05:18 +00:00
Remove overlapping data point labels from relay count charts
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 360 KiB After Width: | Height: | Size: 280 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 371 KiB After Width: | Height: | Size: 262 KiB |
@@ -124,16 +124,6 @@ def create_plot(data_frame, title, y_label, output_path):
|
|||||||
plt.grid(True, linestyle='--', alpha=0.7)
|
plt.grid(True, linestyle='--', alpha=0.7)
|
||||||
plt.xticks(rotation=45)
|
plt.xticks(rotation=45)
|
||||||
|
|
||||||
# Add data points annotation
|
|
||||||
for i, row in data_frame.iterrows():
|
|
||||||
plt.annotate(
|
|
||||||
f"{row['count']}",
|
|
||||||
(row['date'], row['count']),
|
|
||||||
textcoords="offset points",
|
|
||||||
xytext=(0, 10),
|
|
||||||
ha='center'
|
|
||||||
)
|
|
||||||
|
|
||||||
# Add current count in the corner
|
# Add current count in the corner
|
||||||
if not data_frame.empty:
|
if not data_frame.empty:
|
||||||
latest_count = data_frame['count'].iloc[-1]
|
latest_count = data_frame['count'].iloc[-1]
|
||||||
|
|||||||
Reference in New Issue
Block a user