Skip to content

Commit

Permalink
Fix in doc of visualise.optimization_stats (#1390)
Browse files Browse the repository at this point in the history
* Fixed doc example from generic call (that did not exists) to apropriate call

* Marked code as codeblocks
  • Loading branch information
PaulJonasJost committed May 15, 2024
1 parent 63c5662 commit 049493c
Showing 1 changed file with 37 additions and 27 deletions.
64 changes: 37 additions & 27 deletions pypesto/visualize/optimization_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,19 @@ def optimization_run_properties_one_plot(
Examples
--------
optimization_properties_per_multistart(
result1,
properties_to_plot=['time'],
colors=[.5, .9, .9, .3])
optimization_properties_per_multistart(
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 = [
Expand Down Expand Up @@ -156,24 +160,30 @@ def optimization_run_properties_per_multistart(
Examples
--------
optimization_properties_per_multistart(
result1,
properties_to_plot=['time'],
colors=[.5, .9, .9, .3])
optimization_properties_per_multistart(
[result1, result2],
properties_to_plot=['time'],
colors=[[.5, .9, .9, .3], [.2, .1, .9, .5]])
optimization_properties_per_multistart(
result1,
properties_to_plot=['time', 'n_grad'],
colors=[.5, .9, .9, .3])
optimization_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 = [
Expand Down

0 comments on commit 049493c

Please sign in to comment.