KristofferC / PGFPlotsX.jl

Plots in Julia using the PGFPlots LaTeX package
Other
301 stars 40 forks source link

Legend/labels sometimes do not appear correctly #238

Closed matthieugomez closed 4 years ago

matthieugomez commented 4 years ago

I use the PGFPlotsX backend in Plots in scripts, and I save the plot in pdf format using savefig. My issue is that, sometimes, the legend and the labels do not appear correctly in the pdf output. Here is an example:


p = plot(rs, [y1 y2 y3], color = [red blue :black],  label = [ L"\frac{-\frac{i}{q}+g - \rho}{\eta + \delta}" L"\frac{r-\rho}{\eta}" ""], legend=:bottomleft, xtickfontsize=14, ytickfontsize=14, guidefontsize = 14, legendfontsize = 40)
savefig(p, "$(ProjectPath)/output/figure/twostates.pdf") 

Screen Shot 2020-07-14 at 9 38 03 AM Note that the legend has missing characters. Similarly, the yaxis has missing numbers. I have not been able to find a reproductible example: the output is usually correct. I'd appreciate any idea on potential causes, or a pointer on what to try.

tpapp commented 4 years ago

@BeastyBlacksmith, can you please look into whether it is an issue with the Plots backend, or this package?

KristofferC commented 4 years ago

Also good to save to a tex file to see if there is something weird there or if it is a pgfplots bug.

BeastyBlacksmith commented 4 years ago

I remember having similar issues when compiling with pdflatex

tpapp commented 4 years ago

I am still happy to follow up on this from our end, but need at least an MWE with plain vanilla PGFPlotsX (ideally) or the LaTeX code.

Otherwise, since technically this is not demonstrated to be an issue with this package, I would consider closing this.

matthieugomez commented 4 years ago

I now put everything in .tex before .pdf to capture it in case the problem appears again. I have not been able to reproduce again, but I will ping the issue again if that happens. Feel free to close it in the meantime.

On Mon, Aug 3, 2020 at 5:59 AM Tamas K. Papp notifications@github.com wrote:

I am still happy to follow up on this from our end, but need at least an MWE with plain vanilla PGFPlotsX (ideally) or the LaTeX code.

Otherwise, since technically this is not demonstrated to be an issue with this package, I would consider closing this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KristofferC/PGFPlotsX.jl/issues/238#issuecomment-668008390, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPPPXIKWJIBNE2GKLVC2TLR62YCJANCNFSM4OZWFETA .

tpapp commented 4 years ago

Thanks for the feedback. I am closing for now but please feel free to ask for reopening this if the issue shows up again.