Skip to content

Commit 9a4419c

Browse files
authored
fix: logs the provided figure rather than the most recent (#885)
1 parent 9c1d0b4 commit 9a4419c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dvclive/plots/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def dump(self, val, **kwargs) -> None: # noqa: ARG002
3737
elif isinstance_without_import(val, "matplotlib.figure", "Figure"):
3838
import matplotlib.pyplot as plt
3939

40-
plt.savefig(self.output_path)
40+
val.savefig(self.output_path)
4141
plt.close(val)
4242
elif isinstance_without_import(val, "PIL.Image", "Image"):
4343
val.save(self.output_path)

0 commit comments

Comments
 (0)