Ravindra Bagale · Data Scienceसर्व coursesया course चे lessonsशोधाEnglish

Data Science · मराठी आवृत्ती

13.2 Line chart आणि histogram

रवींद्र बागले यांच्या course वर आधारित · सहज मराठीत explanation

या काल्पनिक series मध्ये दिवस 5–6 ला जास्त orders देऊन spike दाखवला आहे. हा teaching pattern आहे; वास्तविक दिवाळीच्या तारखांचा दावा नाही.

# Fictional daily orders in Pune around Diwali
days = list(range(1, 11))
orders = [180, 190, 210, 250, 900, 880, 400, 220, 200, 190]

fig, ax = plt.subplots()
ax.plot(days, orders, marker="o")
ax.set_title("Pune daily orders (fictional) — Diwali spike")
ax.set_xlabel("Day of October 2026")
ax.set_ylabel("Orders")
ax.axhline(500, linestyle="--", label="Spike threshold")
ax.legend()
plt.show()

Delivery minutes कसे पसरले आहेत हे histogram मधून पाहू:

mins = [9, 12, 11, 14, 18, 10, 8, 13, 16, 17, 11, 9]
fig, ax = plt.subplots()
ax.hist(mins, bins=5)
ax.set_title("Delivery minutes distribution (fictional sample)")
ax.set_xlabel("Minutes")
ax.set_ylabel("Count")
plt.show()

Jupyter मध्ये steps

  1. City GMV चा bar chart करा.
  2. Sambhaji Nagar नीट वाचता यावं म्हणून x labels rotate करा.
  3. Threshold line असलेला orders line chart करा.
  4. त्या line chart च्या fig वर fig.savefig("figures/pune_diwali.png", dpi=120) run करा.

दिवस 5–6 चा spike स्पष्ट दिसेल आणि figures/ मध्ये PNG तयार होईल. Histogram बनवल्यावर fig बदलतो; म्हणून line chart save त्याच वेळी करा किंवा त्याचा वेगळा reference ठेवा.