From the docs, under &quot;Getting started&quot;:<p>&gt; When you execute this script, you will see that a new output file &quot;lines.html&quot; is created, and that a browser automatically opens a new tab to display it. (For presentation purposes we have included the plot output directly inline in this document.)<p>This is based on an example calling an output_file() function, but the docs also mention output_notebook(), and I&#x27;m sure you can output to HTML as a string as well. I didn&#x27;t spend too much time digging yet.