Replicating Matlab plots

I’m a little confused about how the matlab API works. Is there an easy way to replicate a matlab plot in plotly, for instance, by automagically generating the javascript code?

Is it what you are looking for -> https://plot.ly/ipython-notebooks/#converting-a-matplotlib-graph-into-an-interactive-graph-inside-an-ipython-notebook