From e5c6b27359e677161ea2a726d17f709dc42cbc54 Mon Sep 17 00:00:00 2001 From: PaulJonasJost Date: Sun, 5 May 2024 18:03:32 +0200 Subject: [PATCH 1/2] Fixed doc example from generic call (that did not exists) to apropriate call --- pypesto/visualize/optimization_stats.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pypesto/visualize/optimization_stats.py b/pypesto/visualize/optimization_stats.py index 74a5323e7..aa0693d52 100644 --- a/pypesto/visualize/optimization_stats.py +++ b/pypesto/visualize/optimization_stats.py @@ -53,12 +53,12 @@ def optimization_run_properties_one_plot( Examples -------- - optimization_properties_per_multistart( + optimization_run_properties_one_plot( result1, properties_to_plot=['time'], colors=[.5, .9, .9, .3]) - optimization_properties_per_multistart( + optimization_run_properties_one_plot( result1, properties_to_plot=['time', 'n_grad'], colors=[[.5, .9, .9, .3], [.2, .1, .9, .5]]) @@ -156,22 +156,22 @@ def optimization_run_properties_per_multistart( Examples -------- - optimization_properties_per_multistart( + optimization_run_properties_per_multistart( result1, properties_to_plot=['time'], colors=[.5, .9, .9, .3]) - optimization_properties_per_multistart( + optimization_run_properties_per_multistart( [result1, result2], properties_to_plot=['time'], colors=[[.5, .9, .9, .3], [.2, .1, .9, .5]]) - optimization_properties_per_multistart( + optimization_run_properties_per_multistart( result1, properties_to_plot=['time', 'n_grad'], colors=[.5, .9, .9, .3]) - optimization_properties_per_multistart( + optimization_run_properties_per_multistart( [result1, result2], properties_to_plot=['time', 'n_fval'], colors=[[.5, .9, .9, .3], [.2, .1, .9, .5]]) """ From 87d53d869e4dc32080da32a9e94bf5ce88d258b5 Mon Sep 17 00:00:00 2001 From: PaulJonasJost Date: Sun, 5 May 2024 20:05:24 +0200 Subject: [PATCH 2/2] Marked code as codeblocks --- pypesto/visualize/optimization_stats.py | 64 ++++++++++++++----------- 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/pypesto/visualize/optimization_stats.py b/pypesto/visualize/optimization_stats.py index aa0693d52..65e864033 100644 --- a/pypesto/visualize/optimization_stats.py +++ b/pypesto/visualize/optimization_stats.py @@ -53,15 +53,19 @@ def optimization_run_properties_one_plot( Examples -------- - optimization_run_properties_one_plot( - result1, - properties_to_plot=['time'], - colors=[.5, .9, .9, .3]) - - optimization_run_properties_one_plot( - result1, - properties_to_plot=['time', 'n_grad'], - colors=[[.5, .9, .9, .3], [.2, .1, .9, .5]]) + .. code-block:: python + + optimization_run_properties_one_plot( + result1, + properties_to_plot=['time'], + colors=[.5, .9, .9, .3] + ) + + optimization_run_properties_one_plot( + result1, + properties_to_plot=['time', 'n_grad'], + colors=[[.5, .9, .9, .3], [.2, .1, .9, .5]] + ) """ if properties_to_plot is None: properties_to_plot = [ @@ -156,24 +160,30 @@ def optimization_run_properties_per_multistart( Examples -------- - optimization_run_properties_per_multistart( - result1, - properties_to_plot=['time'], - colors=[.5, .9, .9, .3]) - - optimization_run_properties_per_multistart( - [result1, result2], - properties_to_plot=['time'], - colors=[[.5, .9, .9, .3], [.2, .1, .9, .5]]) - - optimization_run_properties_per_multistart( - result1, - properties_to_plot=['time', 'n_grad'], - colors=[.5, .9, .9, .3]) - - optimization_run_properties_per_multistart( - [result1, result2], properties_to_plot=['time', 'n_fval'], - colors=[[.5, .9, .9, .3], [.2, .1, .9, .5]]) + .. code-block:: python + + optimization_run_properties_per_multistart( + result1, + properties_to_plot=['time'], + colors=[.5, .9, .9, .3] + ) + + optimization_run_properties_per_multistart( + [result1, result2], + properties_to_plot=['time'], + colors=[[.5, .9, .9, .3], [.2, .1, .9, .5]] + ) + + optimization_run_properties_per_multistart( + result1, + properties_to_plot=['time', 'n_grad'], + colors=[.5, .9, .9, .3] + ) + + optimization_run_properties_per_multistart( + [result1, result2], properties_to_plot=['time', 'n_fval'], + colors=[[.5, .9, .9, .3], [.2, .1, .9, .5]] + ) """ if properties_to_plot is None: properties_to_plot = [