Coming from Matlab, I try my best to understand why the following does not work:
plot(x=rand(10),y=rand(10))
Correctly displays the graph.
x=rand(10) y=rand(10) plot(x,y)
causes an error:
ERROR: plot does not have a suitable graph for the method (:: Array (Float64,1), :: Array (Float64,1))
I would be very grateful if someone would explain to me why embedding the code in the plot line leads to the result, but the definition of variables leads to an error in advance. Logic says that they should give the same result.
I am using Julia v 0.3.1 and downloaded Gadfly as a charting tool.
source share