code: def display(fig=None, closefig=True, **kwargs):
      
      from IPython.display import HTML
      if fig is None:
          fig = plt.gcf()
      if closefig:
          plt.close(fig)
  
      html = fig_to_html(fig, **kwargs)
  
      # We embed everything in an iframe.
      iframe_html = '<iframe src="data:text/html;base64,{html}" width="{width}" height="{height}"></iframe>'\
      .format(html = base64.b64encode(html.encode('utf8')).decode('utf8'),
              width = '100%',
              height= int(60.*fig.get_figheight()),
             )
      return HTML(iframe_html)
docs: Convert a Matplotlib Figure to a Leaflet map. Embed in IPython notebook.
  
      Parameters
      ----------
      fig : figure, default gcf()
          Figure used to convert to map
      closefig : boolean, default True
          Close the current Figure