[julia-users] Re: 2D plot in gadfly

2015-03-08 Thread David Smith
I made this helper function a while back to display images using Gadfly: function imshow(x, title::String=, units::String=, args...) is, js, values = findnz(x) m, n = size(x) df = DataFrames.DataFrame(i=is, j=js, value=values) plot(df, x=j, y=i, color=value,

[julia-users] Re: 2D plot in gadfly

2015-03-08 Thread Tomas Lycken
There's also contour plots using Gadfly plot(layer(x=xgrid, y=ygrid, z=functionvalues, Geom.contour))

[julia-users] Re: 2D plot in gadfly

2015-03-03 Thread Andrei Berceanu
But Geom.rectbin seems to only work for square arrays, which is a severe limitation. On Saturday, February 7, 2015 at 12:44:26 AM UTC+1, Iain Dunning wrote: How about: using Gadfly # Generate some data N = 100 X = Float64[] Y = Float64[] Z = Float64[] for x in linspace(0.0,2π,N), y in

[julia-users] Re: 2D plot in gadfly

2015-03-03 Thread randmstring
Nope, you can also use rectangular pixels: using Gadfly Xmin = Float64[] Xmax = Float64[] Ymin = Float64[] Ymax = Float64[] Z = Float64[] for x in 1:2:30, y in 1:20 push!(Xmin,x-1) push!(Ymin,y-0.5) push!(Xmax,x+1) push!(Ymax,y+0.5) push!(Z,x*y) end plot(x_min=Xmin,

[julia-users] Re: 2D plot in gadfly

2015-02-06 Thread Iain Dunning
How about: using Gadfly # Generate some data N = 100 X = Float64[] Y = Float64[] Z = Float64[] for x in linspace(0.0,2π,N), y in linspace(0.0,2π,N) push!(X, x) push!(Y, y) push!(Z, sin(x)*sin(y)) end plot(x=X,y=Y,color=Z,Geom.rectbin) On Friday, February 6, 2015 at 5:34:45 PM