JuliaPlots / Plots.jl

Powerful convenience for Julia visualizations and data analysis
https://docs.juliaplots.org
Other
1.84k stars 356 forks source link

savefig hangs for subplots with PlotlyJS #1397

Open hayatoikoma opened 6 years ago

hayatoikoma commented 6 years ago

I am trying to save a figure with subplots, but the savefig function hangs. I can save a figure without subplots. I also found that the figure can be saved through the savefig function from PlotlyJS.

This is the minimal script to reproduce the problem. I haven't checked it with other backends.

using Plots
plotlyjs()

p1 = plot(rand(5), rand(5))
savefig("plotsave.svg")

p2 = plot(rand(5), rand(5))

p = plot(p1, p2)

PlotlyJS.savefig(p.o, "plotlyjs_test.svg")
savefig("subplotsave.svg")

This is my environment.

julia> Pkg.status("Plots")
 - Plots                         0.15.0

julia> Pkg.status("PlotlyJS")
 - PlotlyJS                      0.10.1

julia> versioninfo()
Julia Version 0.6.2
Commit d386e40 (2017-12-13 18:08 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
kim-tom commented 6 years ago

I have same issue on savefig from Plots. "PlotlyJS.savefig" helped me to save figure .eps on command line. But I can't implement same code on Jupyter Notebook.

youngjaewoo commented 6 years ago

I have a same issue with "savefig" function when saving heatmaps. However, PlotlyJS.savefig function works the REPL.