Skip to content

Commit f268f0d

Browse files
committed
make the 'normalize' argument available in 'runner.live_plot'
1 parent 8462acb commit f268f0d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

adaptive/learner/balancing_learner.py

+2
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ def plot_function(*args):
276276
dm = dm.redim.values(**d)
277277

278278
if dynamic:
279+
# XXX: change when https://github.com/pyviz/holoviews/issues/3637
280+
# is fixed.
279281
return dm.map(lambda obj: obj.opts(framewise=True), hv.Element)
280282
else:
281283
# XXX: change when https://github.com/ioam/holoviews/issues/3085

adaptive/notebook_integration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def live_plot(runner, *, plotter=None, update_interval=2, name=None, normalize=T
9696
9797
Parameters
9898
----------
99-
runner : `Runner`
99+
runner : `~adaptive.Runner`
100100
plotter : function
101101
A function that takes the learner as a argument and returns a
102102
holoviews object. By default ``learner.plot()`` will be called.

adaptive/runner.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -558,12 +558,12 @@ def cancel(self):
558558
"""
559559
self.task.cancel()
560560

561-
def live_plot(self, *, plotter=None, update_interval=2, name=None):
561+
def live_plot(self, *, plotter=None, update_interval=2, name=None, normalize=True):
562562
"""Live plotting of the learner's data.
563563
564564
Parameters
565565
----------
566-
runner : `Runner`
566+
runner : `~adaptive.Runner`
567567
plotter : function
568568
A function that takes the learner as a argument and returns a
569569
holoviews object. By default ``learner.plot()`` will be called.
@@ -573,6 +573,8 @@ def live_plot(self, *, plotter=None, update_interval=2, name=None):
573573
Name for the `live_plot` task in `adaptive.active_plotting_tasks`.
574574
By default the name is None and if another task with the same name
575575
already exists that other `live_plot` is canceled.
576+
normalize : bool
577+
Normalize (scale to fit) the frame upon each update.
576578
577579
Returns
578580
-------

0 commit comments

Comments
 (0)