code: def plot_number_observer(*args, **kwargs):
      
      interactive = kwargs.pop('interactive', False)
      if interactive:
          plot_number_observer_with_nya(*args, **kwargs)
      # elif __on_ipython_notebook():
      #     kwargs['to_png'] = True
      #     plot_number_observer_with_nya(*args, **kwargs)
      else:
          if kwargs.pop('to_png', None) is not None:
              #XXX: Remove an option available only on nyaplot for the consistency
              import warnings
              warnings.warn(
                  "An option 'to_png' is not available with matplotlib. Just ignored.")
          plot_number_observer_with_matplotlib(*args, **kwargs)
docs: Generate a plot from NumberObservers and show it.
      See plot_number_observer_with_matplotlib and _with_nya for details.
  
      Parameters
      ----------
      obs : NumberObserver (e.g. FixedIntervalNumberObserver)
      interactive : bool, default False
          Choose a visualizer. If False, show the plot with matplotlib.
          If True (only available on IPython Notebook), show it with nyaplot.
  
      Examples
      --------
      >>> plot_number_observer(obs1)
      >>> plot_number_observer(obs1, interactive=True)