# Plot() output written to HTML file?

**URL:** <https://discourse.julialang.org/t/plot-output-written-to-html-file/31182>\
**Category:** Tooling\
**Tags:** question, plotting\
**Created:** [November 17, 2019, 4:19pm UTC](https://discourse.julialang.org/t/plot-output-written-to-html-file/31182 "2019-11-17T16:19:01Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![pontus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pontus/32/10438_2.png) [@pontus](https://discourse.julialang.org/u/pontus)\
**Post date:** [November 18, 2019, 3:37pm UTC](https://discourse.julialang.org/t/plot-output-written-to-html-file/31182/5 "2019-11-18T15:37:27Z")

</div>

> [@heliosdrm](#):
>
> Same for IJulia. Or I am missing your point?

Perhaps, just want to send a plot to `index.html` in current working directory.  
Not sure how to do this with “embedding” (“…accept svg output, which can be embedded in html as is”.). Still working on a process that works for Weave/Documenter, so can’t answer your question quite yet.

> [@Tamas\_Papp](#):
>
> can do SVG which works best in HTML, but it requires a working LaTeX environment.

Thank you, will try that this evening.

> [@pfitzseb](#):
>
> You can call `show` with a mime type, e.g.

Thanks, trying this but not getting a file output? Looked at help for `sprint` but it’s not clear how to accomplish.

```julia
sprint(show, "text/html", p) 
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"600\" height=\"400\" viewBox=\"0 0 2400 1600\">\n<defs>\n <clipPath id=\"clip1600\">\n <rect x=\"0\" y=\"0\" width=\"2400\" height=\"1600\"/>\n ...

```

Tried to paste the full output, with and without the quotes, into an `index.html` file, but that doesn’t work (just blank output in browser save for `"\n\n\n \n \n\n\n" `

(Had an issue with GR backend for plots in REPL, 😭 , but was resolved, see: [Resolved: Plot() issue in REPL w/ GR & Qt - Linux Arch](https://discourse.julialang.org/t/resolved-plot-issue-in-repl-w-linux-arch-qt/31237))

---

_[View the full topic](https://discourse.julialang.org/t/plot-output-written-to-html-file/31182)._
