Skip to content

Commit

Permalink
added DPI option
Browse files Browse the repository at this point in the history
  • Loading branch information
civodlu committed Aug 31, 2021
1 parent b5e7e00 commit 79c2028
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/trw/train/analysis_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def gallery(
x_axis_text: List[str],
y_axis_text: List[str],
title: Optional[str] = None,
save_path: Optional[str] = None):
save_path: Optional[str] = None,
dpi: Optional[int] = None):
"""
Create a gallery of images
Expand All @@ -58,6 +59,7 @@ def gallery(
y_axis_text: the text for each y
title: the title of the gallery
save_path: where to save the figure
dpi: dpi of the figure
Returns:
a figure
Expand All @@ -81,7 +83,7 @@ def gallery(
fig.suptitle(title)

if save_path is not None:
fig.savefig(save_path)
fig.savefig(save_path, dpi=dpi)

return fig

Expand Down

0 comments on commit 79c2028

Please sign in to comment.