Hi, I'm trying to plot a line segment between the points [1,1] and [0,0] in 
Z function x^2 + y^2,
i've already plotted f with:
using PyPlot
using Distributions

function f(x)
    return (x[1]^2 + x[2]^2)
    #return sin(x[1]) + cos(x[2])
end

n = 100
x = linspace(-1, 1, n)
y = linspace(-1,1,n)

xgrid = repmat(x',n,1)
ygrid = repmat(y,1,n)

z = zeros(n,n)

for i in 1:n
    for j in 1:n
        z[i:i,j:j] = f([x[i],y[j]])
    end
end

plot_wireframe(xgrid,ygrid,z)

I know already about R (ggplot2) and C, but i'm new with python and julia 
librarys like matlibplot

Reply via email to