Black Lives Matter. Please consider donating to Black Girls Code today.
Dash Enterprise delivers an incredible 21x cost savings 💸Download the e-book!

Embed plotly from Matlab in markdown with iframe

I encounter some troubles when trying to embed a plotly figure created from Matlab (offline) in markdown. In this regard I’ve followed the guidline here namely by simply inserting this html code

frameborder=”0” seamless=”seamless” scrolling=”no”

into my markdown file. The plotly figure was created by this code:

plotly_fig = fig2plotly(gcf, ‘offline’, true, ‘filename’, ‘MyMatlabFig’);

According to the help, the plotly figure should automatically resize when converted from markdown to html (using pandoc). It is however empty.

Interestingly this code snippet works in markdown:

<iframe width="800" height="400" seamless="seamless" scrolling="yes" src="MyMatlabFig.html"...

Can someone give me a hint how I can make the figure appear automatically resized?


Ok, I try to bit a little bit more precise:

This is the html code: