figure_path

ell1fit.plotting.figure_path(path, fmt=None)[source]

Resolve where a figure should be written.

path is normally an output root with no extension, and gets the run’s current format appended. If it already ends in an image extension, that is taken as the caller having said what they want – the public plotting functions take an fname argument, and somebody who asks for a .png by name gets a .png.

Parameters:
pathstr

Output root, or a complete file name.

fmtstr or None

Format to use for a bare root, overriding current_figure_format().

Returns:
str

The path to write.