Having come from Matlab I am struggling to work out why the following does not work:
plot(x=rand(10),y=rand(10))
Produces a graph correctly.
x=rand(10)
y=rand(10)
plot(x,y)
produces error:
ERROR:
plot
has no method matching plot(::Array(Float64,1),::Array(Float64,1))
I would be very grateful if someone coould explain to me why embeding the code within the plot line produces a result, but defining the variables beforehand results in an error. Logic says they should produce the same result.
I am using Julia v 0.3.1 and have loaded Gadfly as charting tool.