Saturday, November 10, 2012
Drawing Function in Octave
# Some references
# http://octave.sourceforge.net/octave/function/text.html
# http://en.wikibooks.org/wiki/Octave_Programming_Tutorial/Plotting
# http://math-blog.com/2011/04/25/plotting-and-graphics-in-octave/
x = [1:0.5:3]
y=x.^2*3
plot(x,y,'-@')
title("y=x^2*3")
xlabel("x")
ylabel("y")
text(1.4,8,"(1.5,6.75)")
text(1.9,13,"(2,12)")
text(2.25,19,"(2.5,18.75)")
print -dpng "foo.png"