Ilya Zakharevich on Sat, 1 Sep 2001 09:55:56 -0400


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

Re: plotminmax written/query for Jacobian functions


On Fri, Aug 31, 2001 at 10:12:40PM +0300, Juhana Sadeharju wrote:
> plot() function:
> 
> 10.900334 |''''''''''''''''''"''''''''''''''''''''''''"''''''''''''''''''|
>           |                  :                        :                  |
>           |                  :                        :                  |
>           |     "            :                        :            "     |
>           |     :            :                        :            :     |
>           |     :            :                        :            :     |
>           |     :            :           __           :            :     |
>           |     ::          ::           ::           ::          ::     |
>           |     ::          : :          ::          : :          ::     |
>           |     ::          : :          ::          : :          ::     |
>           |    : x          : :          ::          : :          x :    |
>           |    : :          : :          ::          : :          : :    |
>           |    : :          : :         :  :         : :          : :    |
>           |    : :          " :         :  :         : "          : :    |
>           |    :  :         : :         :  :         : :         :  :    |
>           |    :  :         : "         :  :         " :         :  :    |
>           |    x  :        :  :         :  :         :  :        :  x    |
>           |    :  :        :   :        x  x        :   :        :  :    |
>           |   :   "        _   :                    :   _        "   :   |
>           |   x                "       _    _       "                x   |
>           | _x     "_    _"     x_   __      __   _x     "_    _"     x_ |
>         0 "",,,,,,,,,"""",,,,,,,,,""",,,,,,,,,,""",,,,,,,,,"""",,,,,,,,,""
>           0                                                       3.141593
> 
> 
> plotminmax() function:
> 
> 11.111111 |'''''*''''''''''''*'''''''''''**'''''''''''*''''''''''''*'''''|
>           |     *           **           **           **           *     |
>           |     *           **           **           **           *     |
>           |     *           **           **           **           *     |
>           |     *           **           **           **           *     |
>           |    **           **           **           **           **    |
>           |    **           **           **           **           **    |
>           |    **           **           **           **           **    |
>           |    ***          **           **           **          ***    |
>           |    * *          **           **           **          * *    |
>           |    * *          **           **           **          * *    |
>           |    * *          ***          **          ***          * *    |
>           |    * *          * *          **          * *          * *    |
>           |    * *          * *          **          * *          * *    |
>           |    * *          * *         ****         * *          * *    |
>           |    * *         ** *         *  *         * **         * *    |
>           |   ** *         *  *         *  *         *  *         * **   |
>           |   *  **        *  *         *  *         *  *        **  *   |
>           |   *   *        *  **       **  **       **  *        *   *   |
>           |  **   **      **   **      *    *      **   **      **   **  |
>           ****     ********     ********    ********     ********     ****
>         0 |..............................................................|
>           0                                                       3.141593
> 
> 
> The plotminmax() shows both where the peaks are located and what are
> their peak values, but plot() shows only the locations.

... but shows them better.  In the spring I had an idea on how to
increase the horizontal resolution twice (by better placements of ':'
above), as in

    x 	      x
    :  	      :
    :	     :
   :   	     :
   :   	vs   : 
   x   	     x
	      
(on the left is the current algorithm, on the right is the algorithm
which takes into account the value at the intermediate point - the
function is concave up).

The same algorithm could be used to improve the display near "sharp"
extrema.
   
   	    
   	   :
  x	   x
  :	   ::
  :	   ::
  ::	  : :
  ::	  : :
 : x  vs  : x
 :	  :  
 :	  :  
 x	  x  

The fact that the intermediate values are above values at the lattice
points ('x's) is shown by ':' above the value.  (Similar to the
current display with ':' of the intermediate values *between* the
values at lattice points.)

Ilya

P.S.  BTW, if all one wants is more points, just use 'dumb' terminal with
gnuplot output of ploth().