from pathlib import Path import matplotlib.pyplot as plt weeks = ["Week 1", "Week 2", "Week 3", "Week 4", "Week 5", "Week 6"] tickets_closed = [42, 38, 47, 55, 61, 58] fig, ax = plt.subplots(layout="constrained") ax.plot(weeks, tickets_closed, marker="o", linewidth=2) ax.set_title("Support tickets closed by week") ax.set_xlabel("Week") ax.set_ylabel("Tickets closed") ax.grid(True, axis="y", alpha=0.3) output = Path("support-tickets-line-chart.png") fig.savefig(output, dpi=160) plt.close(fig) print(f"points: {len(tickets_closed)}") print(f"title: {ax.get_title()}") print(f"x label: {ax.get_xlabel()}") print(f"y label: {ax.get_ylabel()}") print(f"saved: {output}") print(f"bytes: {output.stat().st_size}")