Skip to content

Commit ef1ea3c

Browse files
committed
Enhance figure layout
1 parent 8ab9945 commit ef1ea3c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

utils/videomaker.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ def create_image(__row: pd.Series, __graph, __pos, __n, __gdf, __day):
8181
alpha=0.5,
8282
)
8383
plt.box(False)
84-
plt.title(
85-
f"Time: {(__row.name // 3600):02d}:{(__row.name % 3600) // 60:02d} {__day}"
86-
)
84+
plt.title(f"{__day} {(__row.name // 3600):02d}:{(__row.name % 3600) // 60:02d}")
8785
plt.savefig(
8886
f"./temp_img/{(__row.name / 3600):.2f}.png", dpi=300, bbox_inches="tight"
8987
)
@@ -229,7 +227,7 @@ def create_image(__row: pd.Series, __graph, __pos, __n, __gdf, __day):
229227

230228
with mp.Pool() as pool:
231229
jobs = []
232-
230+
plt.tight_layout()
233231
for time in df.index:
234232
jobs.append(
235233
pool.apply_async(

0 commit comments

Comments
 (0)