def retina_figure(fig, **kwargs):
 pngdata = print_figure(fig, fmt='retina', **kwargs)
 if (pngdata is None):
  return
 (w, h) = _pngxy(pngdata)
 metadata = {'width': (w // 2), 'height': (h // 2)}
 return (pngdata, metadata)

def retina_figure ( fig , ** kwargs ) : pngdata = print_figure ( fig , fmt = 'retina' , ** kwargs ) if ( pngdata is None ) : return ( w , h ) = _pngxy ( pngdata ) metadata = { 'width' : ( w // 2 ) , 'height' : ( h // 2 ) } return ( pngdata , metadata )
format a figure as a pixel-doubled png .