2017-07-30 03:19:40 +00:00
|
|
|
#!/usr/bin/env julia
|
|
|
|
using PyPlot
|
2017-07-30 12:16:58 +00:00
|
|
|
|
|
|
|
# Make sure we are re-using the same conda python
|
2017-07-30 18:22:28 +00:00
|
|
|
if PyCall.libpython != "/srv/conda/lib/libpython3.6m"
|
|
|
|
println("Not re-using conda python! Using " * PyCall.libpython * " instead")
|
2017-07-30 12:16:58 +00:00
|
|
|
exit(1)
|
|
|
|
end
|
|
|
|
|
|
|
|
# We try to plot something, and see if the file saved exists
|
2017-07-30 03:19:40 +00:00
|
|
|
x = linspace(0,2*pi,1000); y = sin(3*x + 4*cos(2*x))
|
|
|
|
plot(x, y, color="red", linewidth=2.0, linestyle="--")
|
|
|
|
savefig("graph.png")
|
|
|
|
if isfile("graph.png")
|
|
|
|
exit(0)
|
|
|
|
else
|
|
|
|
exit(1)
|
|
|
|
end
|
|
|
|
|