@@ -427,6 +427,7 @@ def _gogogo_display(ipympl, use_ipywidgets, display, controls, fig):
427427 if display :
428428 fig .show ()
429429 controls [0 ].show ()
430+ return controls
430431
431432
432433def interactive_plot (
@@ -523,7 +524,7 @@ def f(x, tau):
523524 use_ipywidgets = use_ipywidgets ,
524525 ** kwargs ,
525526 )
526- _gogogo_display (ipympl , use_ipywidgets , display , controls , fig )
527+ controls = _gogogo_display (ipympl , use_ipywidgets , display , controls , fig )
527528 return fig , ax , controls
528529
529530
@@ -675,7 +676,7 @@ def update(change, key, label):
675676 ax .set_xlim (new_x )
676677 ax .set_ylim (new_y )
677678
678- _gogogo_display (ipympl , use_ipywidgets , display , controls , fig )
679+ controls = _gogogo_display (ipympl , use_ipywidgets , display , controls , fig )
679680 return fig , ax , controls
680681
681682
@@ -913,10 +914,12 @@ def eval_xy(x_, y_, params):
913914 ax .set_title (title .format (** params ))
914915
915916 cache .clear ()
916- _gogogo_display (ipympl , use_ipywidgets , display , controls , fig )
917+ controls = _gogogo_display (ipympl , use_ipywidgets , display , controls , fig )
917918 return fig , ax , controls
918919
919920
921+ # portions of this docstring were copied directly from the docsting
922+ # of `matplotlib.pyplot.imshow`
920923def interactive_imshow (
921924 X ,
922925 cmap = None ,
@@ -949,7 +952,7 @@ def interactive_imshow(
949952 X : function or image like
950953 If a function it must return an image-like object. See matplotlib.pyplot.imshow for the
951954 full set of valid options.
952- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
955+ cmap : str or `~matplotlib.colors.Colormap`
953956 The Colormap instance or registered colormap name used to map
954957 scalar data to colors. This parameter is ignored for RGB(A) data.
955958 forwarded to matplotlib
@@ -963,7 +966,7 @@ def interactive_imshow(
963966 If True rescale the colormap for every function update. Will not update
964967 if vmin and vmax are provided or if the returned image is RGB(A) like.
965968 forwarded to matplotlib
966- aspect : {'equal', 'auto'} or float, default: :rc:`image.aspect`
969+ aspect : {'equal', 'auto'} or float
967970 forwarded to matplotlib
968971 interpolation : str
969972 forwarded to matplotlib
@@ -1053,6 +1056,6 @@ def update(change, label, key):
10531056 if title is not None :
10541057 ax .set_title (title .format (** params ))
10551058
1056- _gogogo_display (ipympl , use_ipywidgets , display , controls , fig )
1059+ controls = _gogogo_display (ipympl , use_ipywidgets , display , controls , fig )
10571060
10581061 return fig , ax , controls
0 commit comments