Closed terasakisatoshi closed 4 years ago
Thanks for reporting this! Somehow the svg generated by GR also includes that xml tag, which does not appear in html files, but markdown gets confused with it.
I wonder where this should be fixed exactly, maybe at GR?
A better solution to this would probably be to implement something like https://github.com/piever/Remark.jl/issues/22, and during the build step saving the svg to a file rather than directly into the generated html.
savefig
and display the result using markdown syntax ![](path/to/img/png)
using Plots
gr()
x = -Ï€:0.01:Ï€
p1 = plot(x, cos.(x))
p2 = plot(x, sin.(x))
plot(p1, p2, layout=(2,1))
savefig("saved.png") #hide
# ![not found](saved.png)
The result should be as follow:
I've confirmed the workaround above solves my problem:
Thanks for verifying that it works! I think this should be the preferred approach anyways, I'll add it to the docs.
<?xml version="1.0" encoding="utf-8"?>
occurs when I insert code related to gr backend Plotson the other hand, when I switch to pyplot backend I get no issue. 🤔