These are chat archives for jheinen/GR.jl

8th
Aug 2017
zjroth
@zjroth
Aug 08 2017 16:17
Hi, is it possible/easy to save a GR plot (produced with Plots.jl) to pgf/tikz? This image on gr-framework.org makes me think that this should be possible with gr, but using savefig("plot.tex") doesn't work, and I don't see any references to pgf or tikz in the gr documentation. I did find a pgf plugin in the gr repository; but I also don't see any indication of how plugins are used, let alone whether using this plugin is what I'm looking for.
Josef Heinen
@jheinen
Aug 08 2017 17:59
hist.pdf

@zjroth : should be possible, e.g.:

using GR
figure(figsize=(6,4))
histogram(randn(100000))
savefig("hist.pgf")
pdflatex hist.pgf  # => hist.pdf

In Plots, you will have to use the GKS_WSTYPE environment variable - will check this.

zjroth
@zjroth
Aug 08 2017 22:00
@jheinen Thanks for the reply. I can't get this to work with Plots.jl. I'm still on julia version 0.5, so I think the environment variable is GKSwstype. Setting that to "pgf" and running savefig("hist.pgf") produces a low-resolution .png file (titled "hist.pgf.png"). Unfortunately, though, I don't see any .pgf files.