{"spec_id":"line-filled","library":"matplotlib","language":"python","code":"\"\"\" anyplot.ai\nline-filled: Filled Line Plot\nLibrary: matplotlib 3.10.9 | Python 3.13.13\nQuality: 78/100 | Updated: 2026-05-12\n\"\"\"\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n\n# Data: Monthly website traffic over a year\nnp.random.seed(42)\nmonths = np.arange(1, 13)\n# Simulate website traffic with seasonal trend (higher in summer)\nbase_traffic = 50000\nseasonal = 15000 * np.sin((months - 3) * np.pi / 6)  # Peak in summer\nnoise = np.random.normal(0, 3000, 12)\ntraffic = base_traffic + seasonal + noise\ntraffic = np.maximum(traffic, 0)  # Ensure non-negative\n\n# Plot\nfig, ax = plt.subplots(figsize=(16, 9))\n\n# Fill the area under the line\nax.fill_between(months, traffic, alpha=0.4, color=\"#306998\")\n\n# Draw the line on top\nax.plot(months, traffic, linewidth=3, color=\"#306998\")\n\n# Styling\nax.set_xlabel(\"Month\", fontsize=20)\nax.set_ylabel(\"Website Visitors\", fontsize=20)\nax.set_title(\"line-filled · matplotlib · pyplots.ai\", fontsize=24)\nax.tick_params(axis=\"both\", labelsize=16)\nax.set_xticks(months)\nax.set_xticklabels([\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"])\nax.set_xlim(1, 12)\nax.set_ylim(0, None)  # Start y-axis at 0 for proper fill effect\nax.grid(True, alpha=0.3, linestyle=\"--\")\n\nplt.tight_layout()\nplt.savefig(\"plot.png\", dpi=300, bbox_inches=\"tight\")\n"}