If you really got stuck with plotting using native Julia, as a last resort, you can also use MATLAB to plot directly from Julia using MATLAB.jl
.
using MATLAB
mxcall(:subplot,0, "111")
mxcall(:pcolor, 0, con)
mxcall(:shading,0,"interp")
mxcall(:axis,0,"off")
mxcall(:axis,0,"equal")
mxcall(:title,0,"simulation")
mxcall(:colorbar,0)
temp="fig$(jj).png"
@mput temp
mat"saveas(gca,temp)"
So basically, con
is a julia Array{Float64,2}
it can be used as julia type directly, and temp
is String, but it need to put into MATLAB session, because Julia canāt hold the gca type, so saveas(gca,temp)
has to be eval inside MATLAB as an expression.
or just put the data you want to plot into MATLAB session and eval the whole script:
using MATLAB
temp="fig$(jj).png"
@mput con
@mput temp
mat"""
subplot(1,1,1)
pcolor(con), shading interp, ...
axis('off'), axis('equal'), title('simulation');
colorbar
saveas(gca,temp);
"""