%Octave, simple 2D plotting example

x = [1 2 3 4 5 6 7 8 9 10];
y1 = [.16 .08 .04 .02 .013 .007 .004 .002 .001 .0008 ];
y2 = [.16 .07 .03 .01 .008 .003 .0008 .0003 .00007 .00002 ];

graphics_toolkit("fltk");%selects openGl
%graphics_toolkit("gnuplot");%selects gnuplot
%opengl and gnuplot look different!

clf(); %clear figure queue or will draw on top of previous figures

plot(x, y1, "marker", "d", "markersize", 3, "markerfacecolor", "blue"); 
hold on;
plot(x, y2, "marker", "o", "markersize", 3, "markerfacecolor", "red"); 
%Other options for markers are o,+,*,x, d (diamond), s(square)
%Other colors are red, green, blue, magenta, cyan, brown, black  
%Can use semilog() and loglog() instead of plot()

title('Plot title');
xlabel('X axis');
ylabel('Y axis');

%save plot as svg (scalable vector graphic) so 
%can touch up in Inkscape and then convert within Inkscape
%to eps (encapsulated postscript) for Latex. 
%Could also just save now directly as .eps file

print -dsvg plot_test1.svg 

