Skip to content

Commit

Permalink
Fix typos, create output_dir if it doesn't exit
Browse files Browse the repository at this point in the history
  • Loading branch information
eachanjohnson committed Oct 5, 2024
1 parent 03e2ec2 commit 79bb084
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions carabiner/mpl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def scattergrid(
return fig, axes

def figsaver(
dir: str = ".",
output_dir: str = ".",
prefix: Optional[str] = None,
dpi: int = 300,
format: str = 'png',
Expand All @@ -223,7 +223,7 @@ def figsaver(
Parameters
----------
dir : str, optional
output_dir : str, optional
Directory to save figures. Default: ".".
prefix : str, optional
Prefix for filenames. Default: no prefix.
Expand All @@ -241,6 +241,9 @@ def figsaver(
"""

if not os.path.exists(output_dir):
os.mkdir(output_dir)

def _figsave(
fig: figure.Figure,
name: str,
Expand Down

0 comments on commit 79bb084

Please sign in to comment.