1## Copyright (C) 1998-2003 Joao Cardoso.
2##
3## This program is free software; you can redistribute it and/or modify it
4## under the terms of the GNU General Public License as published by the
5## Free Software Foundation; either version 2 of the License, or (at your
6## option) any later version.
7##
8## This program is distributed in the hope that it will be useful, but
9## WITHOUT ANY WARRANTY; without even the implied warranty of
10## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11## General Public License for more details.
12##
13## This file is part of plplot_octave.
14
15function p12(fg)
16
17  global pl_automatic_replot
18  t = pl_automatic_replot;
19  pl_automatic_replot = 0;
20
21  title("War Game");
22  legend("off");
23  x=0:0.1:4;
24  plot(x,exp(x));
25  text(1,20,"Click Here -> + ");
26  if (!nargin)
27    [x y]=ginput(1);
28    if (round(x) != 2 || round(y) != 20)
29      text(x,y,"You missed!")
30    else
31      text(x,y,"ouch! Gently!")
32    endif
33  endif
34  legend("on");
35
36  pl_automatic_replot = t;
37
38endfunction
39