@@ -372,7 +372,9 @@ def plot_with_vis_spec(
372372 measurements_df : Optional [Union [str , pd .DataFrame ]] = None ,
373373 simulations_df : Optional [Union [str , pd .DataFrame ]] = None ,
374374 subplot_dir : Optional [str ] = None ,
375- plotter_type : str = 'mpl' ) -> Optional [Dict [str , plt .Subplot ]]:
375+ plotter_type : str = 'mpl' ,
376+ format_ : str = 'png' ,
377+ ) -> Optional [Dict [str , plt .Subplot ]]:
376378 """
377379 Plot measurements and/or simulations. Specification of the visualization
378380 routines is provided in visualization table.
@@ -394,6 +396,9 @@ def plot_with_vis_spec(
394396 plotter_type:
395397 Specifies which library should be used for plot generation. Currently,
396398 only matplotlib is supported.
399+ format_:
400+ File format for the generated figure.
401+ (See :py:func:`matplotlib.pyplot.savefig` for supported options).
397402
398403 Returns
399404 -------
@@ -415,8 +420,8 @@ def plot_with_vis_spec(
415420 else :
416421 raise NotImplementedError ('Currently, only visualization with '
417422 'matplotlib is possible.' )
418- ax = plotter . generate_figure ( subplot_dir )
419- return ax
423+
424+ return plotter . generate_figure ( subplot_dir , format_ = format_ )
420425
421426
422427def plot_without_vis_spec (
@@ -427,7 +432,8 @@ def plot_without_vis_spec(
427432 simulations_df : Optional [Union [str , pd .DataFrame ]] = None ,
428433 plotted_noise : str = MEAN_AND_SD ,
429434 subplot_dir : Optional [str ] = None ,
430- plotter_type : str = 'mpl'
435+ plotter_type : str = 'mpl' ,
436+ format_ : str = 'png' ,
431437) -> Optional [Dict [str , plt .Subplot ]]:
432438 """
433439 Plot measurements and/or simulations. What exactly should be plotted is
@@ -462,6 +468,9 @@ def plot_without_vis_spec(
462468 plotter_type:
463469 Specifies which library should be used for plot generation. Currently,
464470 only matplotlib is supported
471+ format_:
472+ File format for the generated figure.
473+ (See :py:func:`matplotlib.pyplot.savefig` for supported options).
465474
466475 Returns
467476 -------
@@ -484,8 +493,8 @@ def plot_without_vis_spec(
484493 else :
485494 raise NotImplementedError ('Currently, only visualization with '
486495 'matplotlib is possible.' )
487- ax = plotter . generate_figure ( subplot_dir )
488- return ax
496+
497+ return plotter . generate_figure ( subplot_dir , format_ = format_ )
489498
490499
491500def plot_problem (petab_problem : problem .Problem ,
0 commit comments