Plotting on Server

I am trying to install and run julia 0.6.4 on a cluster at school. (Firstly I had to specify package directory away from my home folder in \scratch to accomodate the 5GB.) Then I installed Plots.jl and Plotly.jl. However when I try to display or save the plots, I am getting the following errors.

using Plots
Plots.backend()            # Plots.PlotlyBackend()
plt = plot(1:9, cumsum(rand(0:9, 9)))
# Gives
# Error showing value of type Plots.Plot{Plots.PlotlyBackend}:
# ERROR: could not spawn `xdg-open /tmp/juliafDEpPG.html`: no such file or directory (ENOENT)

I realize that xdg-open is not on the cluster but the file /tmp/juliafDEpPG.html is on the cluster. When I copy it to local firefox does not show anything. I guess because the file says: <script src="file:///scratch/users/rakesh/dotjulia/v0.6/Plots/deps/plotly-latest.min.js"></script> When I make it point to my local installation of Plotly it works. Or when I savefig(plt, 'name.html'), it works! So that’s ok.

But the following fail

julia> savefig(plt, "tmp1.png")
ERROR: MethodError: no method matching _show(::IOStream, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.PlotlyBackend})
Closest candidates are:
  _show(::IO, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.PyPlotBackend}) at /scratch/users/rakesha/dotjulia/v0.6/Plots/src/backends/pyplot.jl:1359
  _show(::IO, ::MIME{Symbol("text/html")}, ::Plots.Plot{Plots.PlotlyBackend}) at /scratch/users/rakesha/dotjulia/v0.6/Plots/src/backends/plotly.jl:932
  _show(::IO, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.PlotlyJSBackend}) at /scratch/users/rakesha/dotjulia/v0.6/Plots/src/backends/plotlyjs.jl:105

I get similar errors for .svg, .pdf. How do I fix that?
Thanks.

It looks like Plotly.jl doesn’t support saving figures as a png. You should try another backend and see if that fixes the problem.

The website http://docs.juliaplots.org/latest/output/#savefig-format seems to say it does support.