[genius] Fri Sep 05 21:20:02 2014 Jiri (George) Lebl <jirka 5z com>



commit 2ff0077d503e607105b84b4b88767c133fbae396
Author: Jiri (George) Lebl <jiri lebl gmail com>
Date:   Fri Sep 5 21:20:14 2014 -0500

    Fri Sep 05 21:20:02 2014  Jiri (George) Lebl <jirka 5z com>
    
        * src/graphing.c: Add PlotWindowPresent
    
        * examples/*.gel: use the PlotWindowPresent function
    
        * help/C/genius.xml: document the function

 ChangeLog                                 |    8 ++
 NEWS                                      |    4 +-
 examples/cantor.gel                       |    1 +
 examples/dalemb-pulse.gel                 |    1 +
 examples/eulers-method-graphs-exp.gel     |    2 +
 examples/fourier-series-animation.gel     |    2 +
 examples/fourier-series-half-sawtooth.gel |    1 +
 examples/laplace-fdm.gel                  |    2 +
 examples/linapprox.gel                    |    2 +
 examples/lorenz.gel                       |    2 +
 examples/newton-sqrt2.gel                 |    2 +
 examples/shocks.gel                       |    1 +
 examples/sierpinski.gel                   |    1 +
 examples/standing-waves.gel               |    2 +
 examples/strange-attractor.gel            |    2 +
 examples/taylor-exp.gel                   |    5 +-
 examples/taylor-sin.gel                   |    3 +
 help/C/genius.xml                         |   17 +++
 help/genius.txt                           |  190 +++++++++++++++++++++++------
 src/graphing.c                            |    9 ++
 20 files changed, 215 insertions(+), 42 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 563760b..04ee6a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Sep 05 21:20:02 2014  Jiri (George) Lebl <jirka 5z com>
+
+       * src/graphing.c: Add PlotWindowPresent
+
+       * examples/*.gel: use the PlotWindowPresent function
+
+       * help/C/genius.xml: document the function
+
 Fri Sep 05 20:46:23 2014  Jiri (George) Lebl <jirka 5z com>
 
        * src/gnome-genius.c, src/examples.[ch]: rename tutorials to examples
diff --git a/NEWS b/NEWS
index 5fcffa2..cdbe512 100644
--- a/NEWS
+++ b/NEWS
@@ -4,8 +4,8 @@ Changes to 1.0.19
   mathematical concept.  Generally taken from the classes I have been teaching.
   They are installed under prefix/share/genius/examples/ and are mostly using
   graphics so only work in the graphical GNOME/GTK version
-* New 3D graphing functions, SurfacePlotDrawLine, SurfacePlotDrawPoints,
-  SurfacePlotClear
+* New plotting functions: SurfacePlotDrawLine, SurfacePlotDrawPoints,
+  SurfacePlotClear, PlotWindowPresent
 * New rotation animation in the surface plot window
 * A few fixes
 
diff --git a/examples/cantor.gel b/examples/cantor.gel
index 333ecdc..5b17a73 100644
--- a/examples/cantor.gel
+++ b/examples/cantor.gel
@@ -28,4 +28,5 @@ function Cantor(x) = (
     1/(2^N) + sum k = 1 to (N-1) do (t@(k)/(2^(k+1)))
 );
 
+PlotWindowPresent(); # Make sure the window is raised
 LinePlot(Cantor,[0,1]);
diff --git a/examples/dalemb-pulse.gel b/examples/dalemb-pulse.gel
index 47b36a8..e5afc2d 100644
--- a/examples/dalemb-pulse.gel
+++ b/examples/dalemb-pulse.gel
@@ -29,6 +29,7 @@ function F(x) = (
 function yy(x) = (F(x-t) + F(x+t))/2;
 
 LinePlotDrawLegends = false;
+PlotWindowPresent(); # Make sure the window is raised
 
 for n=1 to 1000 do (
        t = n*0.005;
diff --git a/examples/eulers-method-graphs-exp.gel b/examples/eulers-method-graphs-exp.gel
index 03b846e..d01bba3 100644
--- a/examples/eulers-method-graphs-exp.gel
+++ b/examples/eulers-method-graphs-exp.gel
@@ -8,6 +8,8 @@ LinePlotWindow=[-0.2,4,0,e^4+0.2];
 
 LinePlotDrawLegends=false;
 LinePlotClear();
+PlotWindowPresent(); # Make sure the window is raised
+
 LinePlotDrawPoints(0,1,"thickness",10,"color","red");
 
 AskButtons("The initial point (0,1)","Next");
diff --git a/examples/fourier-series-animation.gel b/examples/fourier-series-animation.gel
index 6a3e13f..55ca2a1 100644
--- a/examples/fourier-series-animation.gel
+++ b/examples/fourier-series-animation.gel
@@ -19,6 +19,8 @@ function F(x) = (
 LinePlotWindow=[-pi*1.1,pi*1.1,-3,3];
 LinePlotDrawLegends=false;
 
+PlotWindowPresent(); # Make sure the window is raised
+
 # For faster animation, precompute,
 print("Precomputing Fourier Series...");
 hvals = [0.0:0.1:2.0,2.0:-0.1:0.0];
diff --git a/examples/fourier-series-half-sawtooth.gel b/examples/fourier-series-half-sawtooth.gel
index 5715bf4..3c6fbbd 100644
--- a/examples/fourier-series-half-sawtooth.gel
+++ b/examples/fourier-series-half-sawtooth.gel
@@ -17,6 +17,7 @@ LinePlotWindow=[-2,2,-0.5,1.5];
 LinePlotDrawLegends=false;
 
 LinePlotClear();
+PlotWindowPresent(); # Make sure the window is raised
 
 # Draw the graph by hand to correctly draw the gap
 LinePlotDrawLine([-2,0;-1,1],"thickness",2,"color","darkblue");
diff --git a/examples/laplace-fdm.gel b/examples/laplace-fdm.gel
index 18d0f92..17efa87 100644
--- a/examples/laplace-fdm.gel
+++ b/examples/laplace-fdm.gel
@@ -25,6 +25,8 @@ for n=1 to points+1 do
 # don't draw the legend
 SurfacePlotDrawLegends = false;
 
+PlotWindowPresent(); # Make sure the window is raised
+
 # plot the data
 SurfacePlotDataGrid(u,[0,pi,0,pi]);
 # If you want to export the animation to a sequence of .png
diff --git a/examples/linapprox.gel b/examples/linapprox.gel
index 6ab73a8..58054e8 100644
--- a/examples/linapprox.gel
+++ b/examples/linapprox.gel
@@ -21,6 +21,8 @@ function DoGraph(x) = (
   print("at x=" + x + "  error = |" + lf(x) + " - " + f(x) + "| = " + |lf(x)-f(x)|);
 );
 
+PlotWindowPresent(); # Make sure the window is raised
+
 for x=2 to 5 by 0.0222 do (
   DoGraph(x);
   wait(0.003)
diff --git a/examples/lorenz.gel b/examples/lorenz.gel
index a536d68..a229dd9 100644
--- a/examples/lorenz.gel
+++ b/examples/lorenz.gel
@@ -24,6 +24,8 @@ SurfacePlotDrawLegends = false;
 # SurfacePlotDrawLine doesn't clear the 3D canvas, so we must do it
 # manually
 SurfacePlotClear ();
+PlotWindowPresent(); # Make sure the window is raised
+
 # Note that we are picking out just the x coordinates
 SurfacePlotDrawLine (pt@(,2:4), "color", "blue", "window", "fit");
 
diff --git a/examples/newton-sqrt2.gel b/examples/newton-sqrt2.gel
index 272ce35..40cfec3 100644
--- a/examples/newton-sqrt2.gel
+++ b/examples/newton-sqrt2.gel
@@ -9,6 +9,8 @@ df = SymbolicDerivative(f);
 
 LinePlotDrawLegends=false;
 LinePlotClear();
+PlotWindowPresent(); # Make sure the window is raised
+
 
 LinePlot(f);
 LinePlotDrawLine(c1,-100,c1,100,"color","red","thickness",1);
diff --git a/examples/shocks.gel b/examples/shocks.gel
index 0d164b5..e5fb2e6 100644
--- a/examples/shocks.gel
+++ b/examples/shocks.gel
@@ -36,6 +36,7 @@ tend = 1.5;
 LinePlotWindow = [xstart,xend,-0.1,tend+0.1];
 LinePlotDrawLegends = false;
 LinePlotClear();
+PlotWindowPresent(); # Make sure the window is raised
 
 # color in [red,green,blue]
 # Color according to phi
diff --git a/examples/sierpinski.gel b/examples/sierpinski.gel
index 9ec0053..96fca42 100644
--- a/examples/sierpinski.gel
+++ b/examples/sierpinski.gel
@@ -5,6 +5,7 @@ function dist(p1,p2) = sqrt((p1@(1)-p2@(1))^2+(p1@(2)-p2@(2))^2);
 
 p = [0,0;1,0;0.5,sqrt(3)/2];
 LinePlotClear();
+PlotWindowPresent(); # Make sure the window is raised
 
 x=[0.5,0.5];
 LinePlotWindow = [-0.1,1.1,-0.1,sqrt(3)/2+0.1];
diff --git a/examples/standing-waves.gel b/examples/standing-waves.gel
index 348a94e..807ba0a 100644
--- a/examples/standing-waves.gel
+++ b/examples/standing-waves.gel
@@ -3,6 +3,8 @@
 
 the_answer = AskButtons("Number of dimensions?", "2D", "3D");
 
+PlotWindowPresent(); # Make sure the window is raised
+
 if the_answer == 1 then (
     LinePlotDrawLegends = false;
 
diff --git a/examples/strange-attractor.gel b/examples/strange-attractor.gel
index 921f55b..d64a942 100644
--- a/examples/strange-attractor.gel
+++ b/examples/strange-attractor.gel
@@ -26,6 +26,8 @@ ptnum = 5000;
 x = [0.0,0.0];
 
 LinePlotDrawLegends = false;
+PlotWindowPresent(); # Make sure the window is raised
+
 
 points = null;
 
diff --git a/examples/taylor-exp.gel b/examples/taylor-exp.gel
index 43d343d..7a445c7 100644
--- a/examples/taylor-exp.gel
+++ b/examples/taylor-exp.gel
@@ -2,7 +2,10 @@
 # Name: Taylor approximations of the exponential
 
 LinePlotWindow = [-3,3,-1,10];
-LinePlotDrawLegends=false;
+LinePlotDrawLegends = false;
+
+PlotWindowPresent(); # Make sure the window is raised
+
 for M=0 to 8 do (
   print("Taylor polynomial of degree = " + M);
   LinePlot(`(x)=e^x,`(x)=(sum n=0 to M do (1/(n!))*x^n));
diff --git a/examples/taylor-sin.gel b/examples/taylor-sin.gel
index 7a22852..f2eaceb 100644
--- a/examples/taylor-sin.gel
+++ b/examples/taylor-sin.gel
@@ -9,6 +9,9 @@ function c(n) = (
   else
     ((-1)^((n-1)/2))/(n!)
 );
+
+PlotWindowPresent(); # Make sure the window is raised
+
 for M=0 to 12 do (
   print("Taylor polynomial of degree = " + M);
   LinePlot(`(x)=sin(x),`(x)=(sum n=0 to M do c(n)*(x^n)));
diff --git a/help/C/genius.xml b/help/C/genius.xml
index 3b4dc39..60f41e0 100644
--- a/help/C/genius.xml
+++ b/help/C/genius.xml
@@ -8833,6 +8833,23 @@ optionally the limits as <userinput>x1,x2,y1,y2</userinput>.
         </varlistentry>
 
         <varlistentry>
+         <term><anchor id="gel-function-PlotWindowPresent"/>PlotWindowPresent</term>
+         <listitem>
+          <synopsis>PlotWindowPresent ()</synopsis>
+          <para>
+                 Show and raise the plot window, creating it if necessary.
+                 Normally the window is created when one of the plotting
+                 functions is called, but it is not always raised if it
+                 happens to be below other windows.  So this function is
+                 good to call in scripts where the plot window might have 
+                 been created before, and by now hidden behind the console
+                 or other windows.
+          </para>
+         <para>Version 1.0.19 onwards.</para>
+         </listitem>
+        </varlistentry>
+
+        <varlistentry>
          <term><anchor id="gel-function-SlopefieldClearSolutions"/>SlopefieldClearSolutions</term>
          <listitem>
           <synopsis>SlopefieldClearSolutions ()</synopsis>
diff --git a/help/genius.txt b/help/genius.txt
index 551849f..50b03b0 100644
--- a/help/genius.txt
+++ b/help/genius.txt
@@ -75,7 +75,7 @@ Kai Willadsen
    To report a bug or make a suggestion regarding the Genius
    Mathematics Tool application or this manual, please visit the
    Genius Web page or email me at <jirka 5z com>.
-   This manual describes version 1.0.18 of Genius.
+   This manual describes version 1.0.19 of Genius.
      __________________________________________________________
 
    Table of Contents
@@ -361,7 +361,7 @@ genius> load path/to/program.gel
 
    Genius Mathematics Tool keeps track of the current directory.
    To list files in the current directory type ls, to change
-   directory do cd directory as in the unix command shell.
+   directory do cd directory as in the UNIX command shell.
      __________________________________________________________
 
 To Create a New Program
@@ -705,7 +705,7 @@ Null
    performed on it, and nothing is printed when it is returned.
    Therefore, null is useful when you do not want output from an
    expression. The value null can be obtained as an expression
-   when you type ., the contant null or nothing. By nothing we
+   when you type ., the constant null or nothing. By nothing we
    mean that if you end an expression with a separator ;, it is
    equivalent to ending it with a separator followed by a null.
 
@@ -981,7 +981,7 @@ Modular Evaluation
    simply gives the remainder, but that may be time consuming if
    not impossible when working with larger numbers. For example,
    10^(10^10) % 6 will simply not work (the exponent will be too
-   large), while 10^(10^10) mod 6 is instanteneous. The first
+   large), while 10^(10^10) mod 6 is instantaneous. The first
    expression first tries to compute the integer 10^(10^10) and
    then find remainder after division by 6, while the second
    expression evaluates everything modulo 6 to begin with.
@@ -1089,7 +1089,7 @@ List of GEL Operators
 
    a./b
           Element by element division. Same as a/b for numbers,
-          but operarates element by element on matrices.
+          but operates element by element on matrices.
 
    a\b
           Back division. That is this is the same as b/a.
@@ -1179,7 +1179,7 @@ List of GEL Operators
 
    -a
           Negation operator. Returns the negative of a number or a
-          matrix (works elementwise on a matrix).
+          matrix (works element-wise on a matrix).
 
    &a
           Variable referencing (to pass a reference to a
@@ -1253,7 +1253,7 @@ genius> 1:2:9
           done only from version 1.0.18 onwards, so execution of
           your code may differ on older versions. If you want to
           avoid dealing with this issue, use actual rational
-          numbers, possibly useing the float if you wish to get
+          numbers, possibly using the float if you wish to get
           floating point numbers in the end. For example 1:2/5:3
           does the right thing and float(1:2/5:3) even gives you
           floating point numbers and is ever so slightly more
@@ -1537,7 +1537,7 @@ function f() = (a:=5);
 f();
 
    Sometimes, however, it is necessary to set a global variable
-   from inside a function. When this behaviour is needed, use the
+   from inside a function. When this behavior is needed, use the
    set function. Passing a string or a quoted identifier to this
    function sets the variable globally (on the top level). For
    example, to set a to the value 3 you could call:
@@ -1584,8 +1584,7 @@ parameter foo = 1
    When you undefine a parameter using the undefine function, it
    stops being a parameter.
 
-   Some parameters are built-in and modify the behaviour of
-   genius.
+   Some parameters are built-in and modify the behavior of genius.
      __________________________________________________________
 
 Returning
@@ -1669,7 +1668,7 @@ a:=4
 a@(1,1) := 5
 a@(4:8,3) := [1,2,3,4,5]'
 
-   Note that both := and = can be used interchangably. Except if
+   Note that both := and = can be used interchangeably. Except if
    the assignment appears in a condition. It is thus always safer
    to just use := when you mean assignment, and == when you mean
    comparison.
@@ -1698,8 +1697,8 @@ function f(M) = (
 
 Toplevel Syntax
 
-   The synatax is slightly different if you enter statements on
-   the top level versus when they are inside parentheses or inside
+   The syntax is slightly different if you enter statements on the
+   top level versus when they are inside parentheses or inside
    functions. On the top level, enter acts the same as if you
    press return on the command line. Therefore think of programs
    as just sequence of lines as if were entered on the command
@@ -1857,11 +1856,11 @@ function f(g,x) = (
 );
 
    Then the code will work as expected and prints out 11. Note
-   that the local statement initializes all the refereced
+   that the local statement initializes all the referenced
    variables (except for function arguments) to a null.
 
    If all variables are to be created as locals you can just pass
-   an asterix instead of a list of variables. In this case the
+   an asterisk instead of a list of variables. In this case the
    variables will not be initialized until they are actually set
    of course. So the following definition of f will also work:
 function f(g,x) = (
@@ -1898,7 +1897,7 @@ Loading Programs
    This has to be done on the top level and not inside any
    function or whatnot, and it cannot be part of any expression.
    It also has a slightly different syntax than the rest of
-   genius, more similiar to a shell. You can enter the file in
+   genius, more similar to a shell. You can enter the file in
    quotes. If you use the '' quotes, you will get exactly the
    string that you typed, if you use the "" quotes, special
    characters will be unescaped as they are for strings. Example:
@@ -1907,7 +1906,7 @@ load "Weird File Name With SPACES.gel"
 
    There are also cd, pwd and ls commands built in. cd will take
    one argument, ls will take an argument that is like the glob in
-   the unix shell (i.e., you can use wildcards). pwd takes no
+   the UNIX shell (i.e., you can use wildcards). pwd takes no
    arguments. For example:
 cd directory_with_gel_programs
 ls *.gel
@@ -1915,14 +1914,14 @@ ls *.gel
 
 Matrices in GEL
 
-   Genius has support for vectors and matrices and posesses a
+   Genius has support for vectors and matrices and possesses a
    sizable library of matrix manipulation and linear algebra
    functions.
      __________________________________________________________
 
 Entering Matrices
 
-   To enter matrixes, you can use one of the following two
+   To enter matrices, you can use one of the following two
    syntaxes. You can either enter the matrix on one line,
    separating values by commas and rows by semicolons. Or you can
    enter each row on one line, separating values by commas. You
@@ -1938,7 +1937,7 @@ Entering Matrices
    Do not use both ';' and return at once on the same line though.
 
    You can also use the matrix expansion functionality to enter
-   matricies. For example you can do:
+   matrices. For example you can do:
 a = [ 1, 2, 3
       4, 5, 6
       7, 8, 9]
@@ -1951,8 +1950,8 @@ b = [ a,  10
  7,   8,  9, 10
  11, 11, 11, 12]
 
-   similiarly you can build matricies out of vectors and other
-   stuff like that.
+   similarly you can build matrices out of vectors and other stuff
+   like that.
 
    Another thing is that non-specified spots are initialized to 0,
    so
@@ -2137,7 +2136,7 @@ help FunctionName
 
 load "file.gel"
 
-          Load a file into the interpretor. The file will execute
+          Load a file into the interpreter. The file will execute
           as if it were typed onto the command line.
 
    cd
@@ -2852,7 +2851,7 @@ SurfacePlotVariableNames = ["x","y","z"]
           Tells genius which variable names are used as default
           names for surface plotting functions using SurfacePlot.
           Note that the z does not refer to the dependent
-          (vertical) axis, but to the indepent complex variable
+          (vertical) axis, but to the independent complex variable
           z=x+iy.
 
           Version 1.0.10 onwards.
@@ -3828,7 +3827,7 @@ MillerRabinTest (n,reps)
 MillerRabinTestSure (n)
 
           Use the Miller-Rabin primality test on n with enough
-          bases that assuming the Generalized Reimann Hypothesis
+          bases that assuming the Generalized Riemann Hypothesis
           the result is deterministic.
 
           See Wikipedia or Planetmath or Mathworld for more
@@ -3882,7 +3881,7 @@ PadicValuation (n,p)
 PowerMod (a,b,m)
 
           Compute a^b mod m. The b's power of a modulo m. It is
-          not neccessary to use this function as it is
+          not necessary to use this function as it is
           automatically used in modulo mode. Hence a^b mod m is
           just as fast.
 
@@ -4413,7 +4412,7 @@ AuxiliaryUnitMatrix (n)
           matrix of one zero eigenvalue.
 
           See Planetmath or Mathworld for more information on
-          Jordan Cannonical Form.
+          Jordan Canonical Form.
 
    BilinearForm
 
@@ -6599,7 +6598,7 @@ LinePlotDrawLine (v,...)
           window are from version 1.0.6 onwards.)
 
           The color should be either a string indicating the
-          common english word for the color that GTK will
+          common English word for the color that GTK will
           recognize such as "red", "blue", "yellow", etc...
           Alternatively the color can be specified in RGB format
           as "#rgb", "#rrggbb", or "#rrrrggggbbbb", where the r,
@@ -6648,7 +6647,7 @@ LinePlotDrawPoints (v,...)
           the thickness, the window as 4-vector, or the legend.
 
           The color should be either a string indicating the
-          common english word for the color that GTK will
+          common English word for the color that GTK will
           recognize such as "red", "blue", "yellow", etc...
           Alternatively the color can be specified in RGB format
           as "#rgb", "#rrggbb", or "#rrrrggggbbbb", where the r,
@@ -6744,11 +6743,25 @@ PlotCanvasFreeze ()
 PlotCanvasThaw ()
 
           Thaw the plot canvas frozen by PlotCanvasFreeze and
-          rewdraw the canvas immediately. The canvas is also
-          always thawed after end of execution of any program.
+          redraw the canvas immediately. The canvas is also always
+          thawed after end of execution of any program.
 
           Version 1.0.18 onwards.
 
+   PlotWindowPresent
+
+PlotWindowPresent ()
+
+          Show and raise the plot window, creating it if
+          necessary. Normally the window is created when one of
+          the plotting functions is called, but it is not always
+          raised if it happens to be below other windows. So this
+          function is good to call in scripts where the plot
+          window might have been created before, and by now hidden
+          behind the console or other windows.
+
+          Version 1.0.19 onwards.
+
    SlopefieldClearSolutions
 
 SlopefieldClearSolutions ()
@@ -6816,6 +6829,15 @@ genius> SurfacePlot(|sin|,-1,1,-1,1,0,1.5)
 genius> SurfacePlot(`(x,y)=x^2+y,-1,1,-1,1,-2,2)
 genius> SurfacePlot(`(z)=|z|^2,-1,1,-1,1,0,2)
 
+   LinePlotClear
+
+SurfacePlotClear ()
+
+          Show the surface plot window and clear out functions and
+          any other lines that were drawn.
+
+          Available in version 1.0.19 and onwards.
+
    SurfacePlotData
 
 SurfacePlotData (data)
@@ -6833,7 +6855,7 @@ SurfacePlotData (data,label,[x1,x2,y1,y2,z1,z2])
           Plot a surface from data. The data is an n by 3 matrix
           whose rows are the x, y and z coordinates. The data can
           also be simply a vector whose length is a multiple of 3
-          and so contains the tripples of x, y, z. The data should
+          and so contains the triples of x, y, z. The data should
           contain at least 3 points.
 
           Optionally we can give the label and also optionally the
@@ -6892,6 +6914,95 @@ genius> SurfacePlotDataGrid(d,[-1,1,0,1],"half a saddle")
 
           Version 1.0.16 onwards.
 
+   SurfacePlotDrawLine
+
+SurfacePlotDrawLine (x1,y1,z1,x2,y2,z2,...)
+
+SurfacePlotDrawLine (v,...)
+
+          Draw a line from x1,y1,z1 to x2,y2,z2. x1,y1,z1,
+          x2,y2,z2 can be replaced by an n by 3 matrix for a
+          longer polyline.
+
+          Extra parameters can be added to specify line color,
+          thickness, arrows, the plotting window, or legend. You
+          can do this by adding an argument string "color",
+          "thickness", "window", or "legend", and after it specify
+          the color, the thickness, the window as 6-vector, or the
+          legend.
+
+          The color should be either a string indicating the
+          common English word for the color that GTK will
+          recognize such as "red", "blue", "yellow", etc...
+          Alternatively the color can be specified in RGB format
+          as "#rgb", "#rrggbb", or "#rrrrggggbbbb", where the r,
+          g, or b are hex digits of the red, green, and blue
+          components of the color. Finally, since version 1.0.18,
+          the color can also be specified as a real vector
+          specifying the red green and blue components where the
+          components are between 0 and 1, e.g. [1.0,0.5,0.1].
+
+          The window should be given as usual as
+          [x1,x2,y1,y2,z1,z2], or alternatively can be given as a
+          string "fit" in which case, the x range will be set
+          precisely and the y range will be set with five percent
+          borders around the line.
+
+          Finally, legend should be a string that can be used as
+          the legend in the graph. That is, if legends are being
+          printed.
+
+          Examples:
+
+genius> SurfacePlotDrawLine(0,0,0,1,1,1,"color","blue","thickness",3)
+genius> SurfacePlotDrawLine([0,0,0;1,-1,2;-1,-1,-3])
+
+          Available from version 1.0.19 onwards.
+
+   SurfacePlotDrawPoints
+
+SurfacePlotDrawPoints (x,y,z,...)
+
+SurfacePlotDrawPoints (v,...)
+
+          Draw a point at x,y,z. The input can be an n by 3 matrix
+          for n different points. This function has essentially
+          the same input as SurfacePlotDrawLine.
+
+          Extra parameters can be added to specify line color,
+          thickness, the plotting window, or legend. You can do
+          this by adding an argument string "color", "thickness",
+          "window", or "legend", and after it specify the color,
+          the thickness, the window as 6-vector, or the legend.
+
+          The color should be either a string indicating the
+          common English word for the color that GTK will
+          recognize such as "red", "blue", "yellow", etc...
+          Alternatively the color can be specified in RGB format
+          as "#rgb", "#rrggbb", or "#rrrrggggbbbb", where the r,
+          g, or b are hex digits of the red, green, and blue
+          components of the color. Finally the color can also be
+          specified as a real vector specifying the red green and
+          blue components where the components are between 0 and
+          1.
+
+          The window should be given as usual as
+          [x1,x2,y1,y2,z1,z2], or alternatively can be given as a
+          string "fit" in which case, the x range will be set
+          precisely and the y range will be set with five percent
+          borders around the line.
+
+          Finally, legend should be a string that can be used as
+          the legend in the graph. That is, if legends are being
+          printed.
+
+          Examples:
+
+genius> SurfacePlotDrawPoints(0,0,0,"color","blue","thickness",3)
+genius> SurfacePlotDrawPoints([0,0,0;1,-1,2;-1,-1,1])
+
+          Available from version 1.0.19 onwards.
+
    VectorfieldClearSolutions
 
 VectorfieldClearSolutions ()
@@ -7066,13 +7177,13 @@ Output
    Display 0.0 when floating point number is less than 10^-x
           (0=never chop)
           How to chop output. But only when other numbers nearby
-          are large. See the documentation of the paramter
+          are large. See the documentation of the parameter
           OutputChopExponent.
 
    Only chop numbers when another number is greater than 10^-x
-          When to chop output. This is set by the paramter
+          When to chop output. This is set by the parameter
           OutputChopWhenExponent. See the documentation of the
-          paramter OutputChopExponent.
+          parameter OutputChopExponent.
 
    Remember output settings across sessions
           Should the output settings in the Number/Expression
@@ -7203,7 +7314,8 @@ About Genius Mathematics Tool
    program.
 
    Jiří Lebl was during various parts of the development partially
-   supported for the work by NSF grant DMS 0900885, the University
-   of Illinois at Urbana-Champaign, the University of California
-   at San Diego, and the University of Wisconsin-Madison. The
-   software has been used for both teaching and research.
+   supported for the work by NSF grants DMS 0900885, DMS 1362337,
+   the University of Illinois at Urbana-Champaign, the University
+   of California at San Diego, the University of
+   Wisconsin-Madison, and Oklahoma State University. The software
+   has been used for both teaching and research.
diff --git a/src/graphing.c b/src/graphing.c
index 4e18100..61a7aae 100644
--- a/src/graphing.c
+++ b/src/graphing.c
@@ -8311,6 +8311,14 @@ PlotCanvasThaw_op (GelCtx *ctx, GelETree * * a, int *exception)
        return gel_makenum_null ();
 }
 
+static GelETree *
+PlotWindowPresent_op (GelCtx *ctx, GelETree * * a, int *exception)
+{
+       ensure_window (TRUE /* present */);
+
+       return gel_makenum_null ();
+}
+
 void
 gel_plot_canvas_thaw_completely (void)
 {
@@ -10667,6 +10675,7 @@ gel_add_graph_functions (void)
 
        FUNC (PlotCanvasFreeze, 0, "", "plotting", N_("Freeze the plot canvas, that is, inhibit drawing"));
        FUNC (PlotCanvasThaw, 0, "", "plotting", N_("Thaw the plot canvas and redraw the plot immediately"));
+       FUNC (PlotWindowPresent, 0, "", "plotting", N_("Raise the plot window, and if create the window if 
necessary"));
 
 
        VFUNC (ExportPlot, 2, "filename,type", "plotting", N_("Export the current contents of the plot canvas 
to a file.  The file type is given by the string type, which can be \"png\", \"eps\", or \"ps\"."));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]