Skip to content

Commit 2921085

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3840d71 commit 2921085

File tree

1 file changed

+10
-3
lines changed
  • examples/library_examples/pandas_matplotlib

1 file changed

+10
-3
lines changed

examples/library_examples/pandas_matplotlib/example.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Step 1: Create a sample DataFrame
1717
data = {
1818
"Month": ["Jan", "Feb", "Mar", "Apr", "May", "Jun"],
19-
"Sales": [250, 300, 280, 350, 400, 380]
19+
"Sales": [250, 300, 280, 350, 400, 380],
2020
}
2121
df = pd.DataFrame(data)
2222

@@ -25,8 +25,15 @@
2525

2626
# Step 3: Plot the data
2727
plt.figure(figsize=(8, 5))
28-
plt.plot(df["Month"], df["Sales"], marker='o', label="Sales", color="blue")
29-
plt.plot(df["Month"], df["Moving_Avg"], marker='s', label="Moving Avg", linestyle="--", color="orange")
28+
plt.plot(df["Month"], df["Sales"], marker="o", label="Sales", color="blue")
29+
plt.plot(
30+
df["Month"],
31+
df["Moving_Avg"],
32+
marker="s",
33+
label="Moving Avg",
34+
linestyle="--",
35+
color="orange",
36+
)
3037

3138
plt.title("Monthly Sales with Moving Average")
3239
plt.xlabel("Month")

0 commit comments

Comments
 (0)