def fig_to_vincent(fig):
 renderer = VincentRenderer()
 exporter = Exporter(renderer)
 exporter.run(fig)
 return renderer.chart

def fig_to_vincent ( fig ) : renderer = VincentRenderer ( ) exporter = Exporter ( renderer ) exporter . run ( fig ) return renderer . chart
convert a matplotlib figure to a vincent object .