In [ ]:
using Plots
gr()
In [2]:
x=collect(0:.1:4π)
y=cos.(x)
plot(x,y)
Out[2]:
In [3]:
scatter(x,y)
Out[3]:
In [4]:
bar(x,y)
Out[4]:
In [5]:
plot(sin, x->sin(2x), 0, 2π)
Out[5]:
In [10]:
# Note, hline(Real) doesn't work. Must be hline(Array{Real})
plot(x,y)
hline!([1])
hline!([0,-1])
vline!(0:π:4π)
Out[10]:
In [ ]:
x2d=repmat(x,1,length(x))
y2d=repmat(transpose(x),length(x),1)
z2d=sin.(x2d).*sin.(y2d);
In [ ]:
heatmap(x,x,z2d)
In [ ]:
f(x,y) = sin(x)*sin(y)
#Z = map(f, x2d, y2d)
plot(contour(x2d, y2d, f, fill=true))
#p2 = contour(x, y, Z)
In [ ]:
X = repmat(reshape(x,1,:), length(y), 1)
Y = repmat(y, 1, length(x))
In [ ]:
y2d
In [ ]:
histogram(randn(100))
In [ ]:
histogram2d(randn(1000),randn(1000))