viz: format x-axis ticks with full date (YYYY-MM-DD)
All checks were successful
Generate banlist history graph / build (push) Successful in 6s
All checks were successful
Generate banlist history graph / build (push) Successful in 6s
This commit is contained in:
parent
c6cae6ddc0
commit
2cc881199f
1 changed files with 2 additions and 2 deletions
|
@ -112,10 +112,10 @@ def write_chart(snaps: List[Snapshot], image_path: str) -> None:
|
|||
ax.set_ylabel("IP count")
|
||||
ax.grid(True, linestyle=":", linewidth=0.5)
|
||||
|
||||
# Reduce x-axis label crowding; keep ticks but rotate labels for readability
|
||||
# Use full date labels on major ticks
|
||||
try:
|
||||
locator = mdates.AutoDateLocator(minticks=4, maxticks=8)
|
||||
formatter = mdates.ConciseDateFormatter(locator)
|
||||
formatter = mdates.DateFormatter('%Y-%m-%d')
|
||||
ax.xaxis.set_major_locator(locator)
|
||||
ax.xaxis.set_major_formatter(formatter)
|
||||
except Exception:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue