How to export a plot of Plots.jl with PGFPlotsX using font size and width of the LaTeX document?

Hi,

I already have exported one plot from Plots.jl with the backend PGFPlotsX using savefig and editing the font size and width manually, but I was wondering if is it possible to export a plot of Plots.jl with PGFPlotsX, so that every font (ticks, labels, legends,…) will use the font of my tex-file (paper), and the figure width uses the width e.g. \linewidth of the document?

Currently there is no easy way to do this.
There are some options:

  • use pythontex to feed the parameters from LaTeX to julia and include the tex-output to pick up the font (warning: this will increase the typesetting time significantly)
  • save as standalone .tex-file and modify the output by hand/ script to match your needs -> create pdf -> include pdf in document