A wrapper to translate matplotlib figures into commands for plotly.