JuliaTeX / PGFPlots.jl

This library uses the LaTeX package pgfplots to produce plots.
Other
188 stars 36 forks source link

Plots not showing #151

Closed Bebotron closed 4 years ago

Bebotron commented 4 years ago

This issue was already opened in #123, but their issue was apparently solved by a simple restart. I have had no such luck, so any help is much appreciated. Here's what I'm trying and the output

using PGFPlots
x = [1,2,3]; y = [4,6,2];
plot(x,y)

This produces no plot and gives

TikzPictures.TikzPicture("\\begin{axis}\\addplot+ coordinates {\n(1, 4)\n(2, 6)\n(3, 2)\n};\n\\end{axis}\n", "", "\\usepackage{pgfplots}\n\\pgfplotsset{compat=newest}\n\\pgfplotsset{every axis legend/.append style={%\ncells={anchor=west}}\n}\n\\usetikzlibrary{arrows}\n\\tikzset{>=stealth'}\n", true)
;lualatex

This is LuaHBTeX, Version 1.12.0 (TeX Live 2020/W32TeX) 
 restricted system commands enabled.
**
! End of file on the terminal... why?
;pdf2svg

Usage: pdf2svg <in file.pdf> <out file.svg> [<page no>]
versioninfo()

Julia Version 1.0.3
Commit 099e826241 (2018-12-18 01:34 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
mykelk commented 4 years ago

This looks like a fairly old version of Julia. Are you plotting in Jupyter? What version of Jupyter are you using?

Bebotron commented 4 years ago

Annotation 2020-08-10 210139

Edit: Sorry I should say, I have tried both the REPL and in a notebook, and both give me the same output

mykelk commented 4 years ago

Hmm... It should work in the notebook. Would it be difficult to give Julia 1.5 a try and run it from the Julia 1.5 kernel within Jupyter?

Bebotron commented 4 years ago

Ok I'll give that a try. Before upgrading I should add I just tried again today and got the following warning

WARNING: Method definition _bcs1(Any, Any) in module Broadcast at broadcast.jl:439 overwritten in module ImageFiltering at C:\Users\Bebotron\.julia\packages\ImageFiltering\LvWYb\src\ImageFiltering.jl:28.

Which following that warning, https://github.com/JuliaImages/ImageFiltering.jl/issues/90 suggests that upgrading to Julia 1.5 will fix this issue.

I'll go try that and come back with any updates.

mykelk commented 4 years ago

Great! I hope it works out for you!

Bebotron commented 4 years ago

Shoot sorry I forgot to update. Updating to Julia 1.5.0 seemed to do the trick! However, it only works in jupyter notebooks. Is there support for pgfplots to work in the REPL?

mykelk commented 4 years ago

Great! I think from the REPL, you would just save it as a PDF and then open that file.