JuliaTeX / TikzPictures.jl

Creating PGF/TikZ pictures and saving them in various formats
Other
89 stars 28 forks source link

Display TikzPicture in Atom's Plots pane #35

Closed mroavi closed 6 years ago

mroavi commented 6 years ago

A nice feature would be to display TikzPictures in Atom's embedded Plots pane. Is there any support for that at the moment?

mykelk commented 6 years ago

Yeah, this would be nice. Is Atom pretty stable with Julia 1.0 now?

mroavi commented 6 years ago

I would say so. In my opinion, the best IDE to develop Julia code nowadays. The Plots package works great with Atom's Plots pane (using GR as backend).

mykelk commented 6 years ago

Cool. I was able to test this out. Do know what is involved in enabling this? I see some code mentioning Atom in this. We're interested in PRs that would enable this.

mroavi commented 6 years ago

The Juno Documentation for the latest release explains how this can be done: link

This code displays an SVG on the Plot pane:

struct Baz
    data
end

Base.show(io::IO, ::MIME"image/svg+xml", b::Baz) = print(io, b.data)
Baz(open(f -> read(f, String), "emu.svg"))

plotpane_svg

mykelk commented 6 years ago

This works now. (Master only for the moment for Windows; but the release should be merged soon.)