[Pkg-octave-commit] rev 775 - in trunk/packages/octave2.9-forge/debian: . patches

Rafael Laboissiere rafael at costa.debian.org
Sat Oct 7 14:07:36 UTC 2006


Author: rafael
Date: 2006-10-07 14:07:36 +0000 (Sat, 07 Oct 2006)
New Revision: 775

Added:
   trunk/packages/octave2.9-forge/debian/patches/50-legend-parse-system-output.patch
   trunk/packages/octave2.9-forge/debian/patches/50-pwelch-documentation.patch
Modified:
   trunk/packages/octave2.9-forge/debian/changelog
   trunk/packages/octave2.9-forge/debian/control
Log:
Debian release octave2.9-forge_2006.07.09+dfsg1-4

Modified: trunk/packages/octave2.9-forge/debian/changelog
===================================================================
--- trunk/packages/octave2.9-forge/debian/changelog	2006-10-07 13:16:46 UTC (rev 774)
+++ trunk/packages/octave2.9-forge/debian/changelog	2006-10-07 14:07:36 UTC (rev 775)
@@ -1,3 +1,18 @@
+octave2.9-forge (2006.07.09+dfsg1-4) unstable; urgency=low
+
+  * Rebuilt for Octave 2.9.8 since the API number bumped from 21 to 22.
+  * debian/control: Build-depends on octave2.9 >= 2.9.9
+
+  * debian/patches/50-pwelch-documentation.patch: Updated the documentation
+    of the pwelch function (closes: #373194).  Thanks to David Bateman for
+    the patch.
+
+  * debian/patches/50-legend-parse-system-output.patch: Fixed bug in legend
+    for correctly parsing the output of the system call (taken for CVS
+    upstream, closes: #388579)
+
+ -- Rafael Laboissiere <rafael at debian.org>  Sat,  7 Oct 2006 13:45:02 +0200
+
 octave2.9-forge (2006.07.09+dfsg1-3) unstable; urgency=low
 
   * Rebuilt for Octave 2.9.8 since the API number bumped from 20 to 21.

Modified: trunk/packages/octave2.9-forge/debian/control
===================================================================
--- trunk/packages/octave2.9-forge/debian/control	2006-10-07 13:16:46 UTC (rev 774)
+++ trunk/packages/octave2.9-forge/debian/control	2006-10-07 14:07:36 UTC (rev 775)
@@ -4,7 +4,7 @@
 Maintainer: Debian Octave Group <pkg-octave-devel at lists.alioth.debian.org>
 Uploaders: Rafael Laboissiere <rafael at debian.org>
 Standards-Version: 3.7.2
-Build-Depends: debhelper (>= 5), octave2.9-headers (>= 2.9.8),
+Build-Depends: debhelper (>= 5), octave2.9-headers (>= 2.9.9),
  libxt-dev, gfortran, libqhull-dev, libginac-dev (>= 1.3.3-2+b1),
  libgmp3-dev, libjpeg62-dev, libpng12-dev, libncurses5-dev,
  libreadline5-dev, tetex-bin, libgsl0-dev, netcdfg-dev,

Added: trunk/packages/octave2.9-forge/debian/patches/50-legend-parse-system-output.patch
===================================================================
--- trunk/packages/octave2.9-forge/debian/patches/50-legend-parse-system-output.patch	                        (rev 0)
+++ trunk/packages/octave2.9-forge/debian/patches/50-legend-parse-system-output.patch	2006-10-07 14:07:36 UTC (rev 775)
@@ -0,0 +1,667 @@
+diff -Nur octave2.9-forge-2006.07.09+dfsg1/main/plot/legend.m octave2.9-forge-2006.07.09+dfsg1.new/main/plot/legend.m
+--- octave2.9-forge-2006.07.09+dfsg1/main/plot/legend.m	2006-04-14 14:51:14.000000000 +0200
++++ octave2.9-forge-2006.07.09+dfsg1.new/main/plot/legend.m	2006-10-07 13:42:54.000000000 +0200
+@@ -1,345 +1,346 @@
+-## Copyright (C) 2001 Laurent Mazet
+-##
+-## This program is free software; it is distributed in the hope that it
+-## will be useful, but WITHOUT ANY WARRANTY; without even the implied
+-## warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+-## the GNU General Public License for more details.
+-##
+-## You should have received a copy of the GNU General Public License
+-## along with this file; see the file COPYING.  If not, write to the
+-## Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+-## 02111-1307, USA.
+-
+-## -*- texinfo -*-
+-## @deftypefn {Function File} {} legend (@var{st1}, @var{st2}, @var{st3}, @var{...})
+-## @deftypefnx {Function File} {} legend (@var{st1}, @var{st2}, @var{st3}, @var{...}, @var{pos})
+-## @deftypefnx {Function File} {} legend (@var{matstr})
+-## @deftypefnx {Function File} {} legend (@var{matstr}, @var{pos})
+-## @deftypefnx {Function File} {} legend (@var{cell})
+-## @deftypefnx {Function File} {} legend (@var{cell}, @var{pos})
+-## @deftypefnx {Function File} {} legend ('@var{func}')
+-##
+-## Legend puts a legend on the current plot using the specified strings
+-## as labels. Use independant strings (@var{st1}, @var{st2}, @var{st3}...), a
+-## matrix of strings (@var{matstr}), or a cell array of strings (@var{cell}) to
+-## specify legends. Legend works on line graphs, bar graphs, etc...
+-## Be sure to call plot before calling legend.
+-##
+-## @var{pos} optionally  places the legend in the specified location:
+-##
+-## @multitable @columnfractions 0.1 0.1 0.8
+-## @item @tab 0 @tab
+-##   Don't move the legend box (default)
+-## @item @tab 1 @tab
+-##   Upper right-hand corner
+-## @item @tab 2 @tab
+-##   Upper left-hand corner
+-## @item @tab 3 @tab
+-##   Lower left-hand corner
+-## @item @tab 4 @tab
+-##   Lower right-hand corner
+-## @item @tab -1 @tab
+-##   To the top right of the plot
+-## @item @tab -2 @tab
+-##   To the bottom right of the plot
+-## @item @tab -3 @tab
+-##   To the bottom of the plot
+-## @item @tab [@var{x}, @var{y}] @tab
+-##   To the arbitrary postion in plot [@var{x}, @var{y}]
+-## @end multitable
+-##
+-## Some specific functions are directely avaliable using @var{func}:
+-##
+-## @table @code
+-## @item show
+-##   Show legends from the plot
+-## @item hide
+-## @itemx off
+-##   Hide legends from the plot
+-## @item boxon
+-##   Draw a box around legends
+-## @item boxoff
+-##   Withdraw the box around legends
+-## @item left
+-##   Text is to the left of the keys
+-## @item right
+-##   Text is to the right of the keys
+-## @end table
+-##
+-## REQUIRES: unix piping functionality, grep, sed and awk
+-## @end deftypefn
+-
+-## 2001-03-31 Paul Kienzle
+-##   * use tmpnam for temporary file name; unlink to remove
+-## 2001-09-28 Paul Söderlind <Paul.Soderlind at hhs.se>
+-##   * add a pause after save request to give gnuplot time to write the file
+-##   * add comment to call plot before legend.
+-## 2002-09-18 Paul Kienzle
+-##   * make the pause check every .1 seconds
+-## 2003-04-1 Laurent Mazet
+-##   * add new functions (boxon, boxoff...)
+-##   * rebuild help message
+-## 2003-06-12 Quentin Spencer
+-##   * add support for input in cell array format
+-
+-## PKG_ADD mark_as_command legend
+-function legend (varargin)
+-
+-  ## Use the following for 2.1.39 and below
+-  # varargin = list(varargin, all_va_args);
+-  args = nargin; # silliness: nargin is now a function 
+-
+-  ## Data type
+-
+-  data_type = 0;
+-  va_arg_cnt = 1;
+-
+-  str = "";
+-  if (args > 0)
+-    str = nth (varargin, va_arg_cnt++);
+-  endif;
+-      
+-  ## Test for strings
+-
+-  if (ischar(str)) && (args == 1)
+-    _str = tolower(deblank(str));
+-    _replot = 1;
+-    switch _str
+-      case {"off", "hide"}
+-        __gnuplot_raw__ ("set nokey;\n")
+-      case "show"
+-	__gnuplot_raw__ ("set  key;\n")
+-      case "boxon"
+-	__gnuplot_raw__ ("set  key box;\n")
+-      case "boxoff"
+-	__gnuplot_raw__ ("set  key nobox;\n")
+-      case "left"
+-        __gnuplot_raw__ ("set  key Right noreverse;\n")
+-      case "right"
+-        __gnuplot_raw__ ("set  key Left reverse;\n")
+-      otherwise
+-	_replot = 0;
+-    endswitch
+-    if _replot
+-      if automatic_replot
+-        __gnuplot_replot__
+-      endif
+-      return;
+-    endif
+-  endif
+-
+-  ## Test for data type (0 -> list of string, 1 -> array of string)
+-
+-  if (length(str) != 0) && (ischar(str(1,:))) && (rows(str) != 1) || iscell(str)
+-    data_type = 1;
+-    va_arg_cnt = 1;
+-
+-    if (iscell(str))
+-      data = nth (varargin, va_arg_cnt++);
+-    else
+-      data = cellstr( nth (varargin, va_arg_cnt++));
+-    endif
+-    nb_data = length(data);
+-    args--;
+-  endif;
+-
+-  pos_leg = 1;
+-  
+-  ## Get the original plotting command
+-  
++## Copyright (C) 2001 Laurent Mazet
++##
++## This program is free software; it is distributed in the hope that it
++## will be useful, but WITHOUT ANY WARRANTY; without even the implied
++## warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
++## the GNU General Public License for more details.
++##
++## You should have received a copy of the GNU General Public License
++## along with this file; see the file COPYING.  If not, write to the
++## Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
++## 02111-1307, USA.
++
++## -*- texinfo -*-
++## @deftypefn {Function File} {} legend (@var{st1}, @var{st2}, @var{st3}, @var{...})
++## @deftypefnx {Function File} {} legend (@var{st1}, @var{st2}, @var{st3}, @var{...}, @var{pos})
++## @deftypefnx {Function File} {} legend (@var{matstr})
++## @deftypefnx {Function File} {} legend (@var{matstr}, @var{pos})
++## @deftypefnx {Function File} {} legend (@var{cell})
++## @deftypefnx {Function File} {} legend (@var{cell}, @var{pos})
++## @deftypefnx {Function File} {} legend ('@var{func}')
++##
++## Legend puts a legend on the current plot using the specified strings
++## as labels. Use independant strings (@var{st1}, @var{st2}, @var{st3}...), a
++## matrix of strings (@var{matstr}), or a cell array of strings (@var{cell}) to
++## specify legends. Legend works on line graphs, bar graphs, etc...
++## Be sure to call plot before calling legend.
++##
++## @var{pos} optionally  places the legend in the specified location:
++##
++## @multitable @columnfractions 0.1 0.1 0.8
++## @item @tab 0 @tab
++##   Don't move the legend box (default)
++## @item @tab 1 @tab
++##   Upper right-hand corner
++## @item @tab 2 @tab
++##   Upper left-hand corner
++## @item @tab 3 @tab
++##   Lower left-hand corner
++## @item @tab 4 @tab
++##   Lower right-hand corner
++## @item @tab -1 @tab
++##   To the top right of the plot
++## @item @tab -2 @tab
++##   To the bottom right of the plot
++## @item @tab -3 @tab
++##   To the bottom of the plot
++## @item @tab [@var{x}, @var{y}] @tab
++##   To the arbitrary postion in plot [@var{x}, @var{y}]
++## @end multitable
++##
++## Some specific functions are directely avaliable using @var{func}:
++##
++## @table @code
++## @item show
++##   Show legends from the plot
++## @item hide
++## @itemx off
++##   Hide legends from the plot
++## @item boxon
++##   Draw a box around legends
++## @item boxoff
++##   Withdraw the box around legends
++## @item left
++##   Text is to the left of the keys
++## @item right
++##   Text is to the right of the keys
++## @end table
++##
++## REQUIRES: unix piping functionality, grep, sed and awk
++## @end deftypefn
++
++## 2001-03-31 Paul Kienzle
++##   * use tmpnam for temporary file name; unlink to remove
++## 2001-09-28 Paul Söderlind <Paul.Soderlind at hhs.se>
++##   * add a pause after save request to give gnuplot time to write the file
++##   * add comment to call plot before legend.
++## 2002-09-18 Paul Kienzle
++##   * make the pause check every .1 seconds
++## 2003-04-1 Laurent Mazet
++##   * add new functions (boxon, boxoff...)
++##   * rebuild help message
++## 2003-06-12 Quentin Spencer
++##   * add support for input in cell array format
++
++## PKG_ADD mark_as_command legend
++function legend (varargin)
++
++  ## Use the following for 2.1.39 and below
++  # varargin = list(varargin, all_va_args);
++  args = nargin; # silliness: nargin is now a function 
++
++  ## Data type
++
++  data_type = 0;
++  va_arg_cnt = 1;
++
++  str = "";
++  if (args > 0)
++    str = nth (varargin, va_arg_cnt++);
++  endif;
++      
++  ## Test for strings
++
++  if (ischar(str)) && (args == 1)
++    _str = tolower(deblank(str));
++    _replot = 1;
++    switch _str
++      case {"off", "hide"}
++        __gnuplot_raw__ ("set nokey;\n")
++      case "show"
++	__gnuplot_raw__ ("set  key;\n")
++      case "boxon"
++	__gnuplot_raw__ ("set  key box;\n")
++      case "boxoff"
++	__gnuplot_raw__ ("set  key nobox;\n")
++      case "left"
++        __gnuplot_raw__ ("set  key Right noreverse;\n")
++      case "right"
++        __gnuplot_raw__ ("set  key Left reverse;\n")
++      otherwise
++	_replot = 0;
++    endswitch
++    if _replot
++      if automatic_replot
++        __gnuplot_replot__
++      endif
++      return;
++    endif
++  endif
++
++  ## Test for data type (0 -> list of string, 1 -> array of string)
++
++  if (length(str) != 0) && (ischar(str(1,:))) && (rows(str) != 1) || iscell(str)
++    data_type = 1;
++    va_arg_cnt = 1;
++
++    if (iscell(str))
++      data = nth (varargin, va_arg_cnt++);
++    else
++      data = cellstr( nth (varargin, va_arg_cnt++));
++    endif
++    nb_data = length(data);
++    args--;
++  endif;
++
++  pos_leg = 1;
++  
++  ## Get the original plotting command
++  
+   tmpfilename=tmpnam;
+   syncfile = tmpnam;
+ 
+-  # Save the plot state to a temporary file
++  # Save the plot state to a temporary file
+ 
+   __gnuplot_raw__ (["save \"",tmpfilename,"\"\n"]);
+ 
+   # Force gnuplot to write a synchronization file after the plot state is saved
+   # and wait for it to appear
+ 
+-  __gnuplot_raw__ (["set print \"",syncfile,"\"\nprint 1\nset print\n"]);
+-  attempt=0;
+-  while (isempty(stat(syncfile))) 
+-    if (++attempt > 20) error("gnuplot is not responding"); endif
+-    usleep(1e5); 
++  __gnuplot_raw__ (["set print \"",syncfile,"\"\nprint 1\nset print\n"]);
++  attempt=0;
++  while (isempty(stat(syncfile))) 
++    if (++attempt > 20) error("gnuplot is not responding"); endif
++    usleep(1e5); 
+   end
+ 
+ 
+-  # Parse the plot state file
++  # Parse the plot state file
+ 
+-  awk_prog= \
+-      "BEGIN { \
+-        dq = 0; \
+-        format = \"%s\\n\"; \
+-       } \
+-       NF != 0 { \
+-        for (i=1;i<=NF;i++) { \
+-         if ($(i) == \"\\\"\") { \
+-          if (dp == 0) { \
+-           dp = 1; \
+-           if ($(i+1) != \"\\\"\") { \
+-            i++; \
+-            printf (\"%s\", $(i)); \
+-           } \
+-          format = \" %s\"; \
+-          } else { \
+-           dp = 0; \
+-           format = \"%s\\n\"; \
+-           printf (\"\\n\"); \
+-          } \
+-         } else { \
+-          printf (format, $(i)); \
+-         } \
+-        } \
++  awk_prog= \
++      "BEGIN { \
++        dq = 0; \
++        format = \"%s\\n\"; \
++       } \
++       NF != 0 { \
++        for (i=1;i<=NF;i++) { \
++         if ($(i) == \"\\\"\") { \
++          if (dp == 0) { \
++           dp = 1; \
++           if ($(i+1) != \"\\\"\") { \
++            i++; \
++            printf (\"%s\", $(i)); \
++           } \
++          format = \" %s\"; \
++          } else { \
++           dp = 0; \
++           format = \"%s\\n\"; \
++           printf (\"\\n\"); \
++          } \
++         } else { \
++          printf (format, $(i)); \
++         } \
++        } \
+        }";
+-  shell_cmd=["grep \"^", gnuplot_command_plot, " \" '", tmpfilename, "' | ", \
+-             "sed -e 's/,/ , /g' -e 's/\"/ \" /g'", " | ", \
+-             "awk '", awk_prog, "'"];
+-  [status, plot_cmd] = split(system(shell_cmd),"\n");
++  shell_cmd=["grep \"^", gnuplot_command_plot, " \" '", tmpfilename, "' | ", \
++             "sed -e 's/,/ , /g' -e 's/\"/ \" /g'", " | ", \
++             "awk '", awk_prog, "'"];
++  [status, output] = system(shell_cmd);
++  plot_cmd = split(output,"\n");
+ 
+   # Remove state file and sync file
+ 
+   unlink(tmpfilename);
+-  unlink(syncfile);
++  unlink(syncfile);
+ 
+   # Strip final blank line
+ 
+-  if (~length(deblank(plot_cmd(rows(plot_cmd), :))))
+-    plot_cmd = plot_cmd ([1:rows(plot_cmd)-1],:);
++  if (~length(deblank(plot_cmd(rows(plot_cmd), :))))
++    plot_cmd = plot_cmd ([1:rows(plot_cmd)-1],:);
+   endif;
+-  
+-  ## Look for the number of graph
++  
++  ## Look for the number of graph
+ 
+-  nb_graph = 0;
+-  i = 0;
+-  while (i++ < rows(plot_cmd))
+-    line = deblank(plot_cmd(i,:));
+-    if ((strcmp(line, gnuplot_command_plot)) || (strcmp(line, ",")))
+-      nb_graph++;
+-    endif;
++  nb_graph = 0;
++  i = 0;
++  while (i++ < rows(plot_cmd))
++    line = deblank(plot_cmd(i,:));
++    if ((strcmp(line, gnuplot_command_plot)) || (strcmp(line, ",")))
++      nb_graph++;
++    endif;
+   endwhile;
+-  
+-  ## Change the legend of each graph
++  
++  ## Change the legend of each graph
+ 
+-  new_plot = [];
+-  if (data_type == 0)
+-    va_arg_cnt = 1;
+-  endif;
+-
+-  fig = 0;
+-  i = 1;
+-  while (fig < nb_graph)
+-
+-    ## Get the legend string
+-
+-    if (((data_type == 0) && (args <= 0)) || \
+-        ((data_type == 1) && (fig >= nb_data)))
+-      leg = "\"\"";
+-    else
+-      if (data_type == 0)
+-        leg = nth (varargin, va_arg_cnt++);
+-        args--;
+-      else
+-        leg = data{fig+1};
+-      endif;
+-      if (!ischar(leg))
+-        pos_leg = leg;
+-        leg = "\"\"";
+-      elseif (length(deblank(leg)) == 0)
+-        leg = "\"\"";
+-      else
+-        leg=["\"" leg "\""];
+-      endif;
+-    endif;
+-
+-    ## look for the end of the graph command i.e. ","
+-
+-    new_line = [deblank(plot_cmd(i++,:)), " \"", \
+-                strrep(deblank(plot_cmd(i++,:)), "'", "") "\""];
+-    while ((i <= rows(plot_cmd)) && (!strcmp(deblank(plot_cmd(i,:)), ",")))
+-      if (strcmp(deblank(plot_cmd(i,:)), gnuplot_command_title))
+-        new_line = [new_line, " ", gnuplot_command_title, " ", leg];
+-        i++;
+-      else
+-        new_line = [new_line, " ", deblank(plot_cmd(i,:))];
+-      endif;
+-      i++;
+-    endwhile;
+-
+-    if (length(new_plot))
+-      new_plot = [ new_plot, new_line];
+-    else
+-      new_plot = new_line;
+-    endif;
+-    
+-    fig++;
++  new_plot = [];
++  if (data_type == 0)
++    va_arg_cnt = 1;
++  endif;
++
++  fig = 0;
++  i = 1;
++  while (fig < nb_graph)
++
++    ## Get the legend string
++
++    if (((data_type == 0) && (args <= 0)) || \
++        ((data_type == 1) && (fig >= nb_data)))
++      leg = "\"\"";
++    else
++      if (data_type == 0)
++        leg = nth (varargin, va_arg_cnt++);
++        args--;
++      else
++        leg = data{fig+1};
++      endif;
++      if (!ischar(leg))
++        pos_leg = leg;
++        leg = "\"\"";
++      elseif (length(deblank(leg)) == 0)
++        leg = "\"\"";
++      else
++        leg=["\"" leg "\""];
++      endif;
++    endif;
++
++    ## look for the end of the graph command i.e. ","
++
++    new_line = [deblank(plot_cmd(i++,:)), " \"", \
++                strrep(deblank(plot_cmd(i++,:)), "'", "") "\""];
++    while ((i <= rows(plot_cmd)) && (!strcmp(deblank(plot_cmd(i,:)), ",")))
++      if (strcmp(deblank(plot_cmd(i,:)), gnuplot_command_title))
++        new_line = [new_line, " ", gnuplot_command_title, " ", leg];
++        i++;
++      else
++        new_line = [new_line, " ", deblank(plot_cmd(i,:))];
++      endif;
++      i++;
++    endwhile;
++
++    if (length(new_plot))
++      new_plot = [ new_plot, new_line];
++    else
++      new_plot = new_line;
++    endif;
++    
++    fig++;
+   endwhile;
+-  
+-  ## Create a new plotting command
+-
++  
++  ## Create a new plotting command
++
+   new_plot = [new_plot, "\n"];  
+-  __gnuplot_raw__ (new_plot)
+-
+-  ## Check for the last argument if we don't already get it
+-  
+-  while (args-- > 0)
+-    pos_leg = nth (varargin, va_arg_cnt++) ;
+-    if (ischar(pos_leg))
+-      pos_leg = 0;
+-    endif;
+-  endwhile;
+-  
+-  ## Change the legend position
+-
+-  if ((isscalar (pos_leg)) && (isreal(pos_leg)))
+-    switch (pos_leg)
+-      case 1
+-        __gnuplot_raw__ ("set  key right top;\n")
+-      case 2
+-        __gnuplot_raw__ ("set  key left top;\n")
+-      case 3
+-        __gnuplot_raw__ ("set  key left bottom;\n")
+-      case 4
+-        __gnuplot_raw__ ("set  key right bottom;\n")
+-      case -1
+-        __gnuplot_raw__ ("set  key right top outside;\n")
+-      case -2
+-        __gnuplot_raw__ ("set  key right bottom outside;\n")
+-      case -3
+-        __gnuplot_raw__ ("set  key below;\n")
+-      otherwise
+-        warning ("incorrect pos");
+-    endswitch;
+-  elseif (isvector (pos_leg)) && (length (pos_leg) == 2) && \
+-        (all(isreal(pos_leg)))
+-    eval (sprintf ("__gnuplot_raw__ (\"set key %e, %e\")", pos_leg(1), pos_leg(2)));
+-  else
+-    warning ("pos must be a scalar");
+-  endif;
+-
+-  ## Regenerate the plot
+-
++  __gnuplot_raw__ (new_plot)
++
++  ## Check for the last argument if we don't already get it
++  
++  while (args-- > 0)
++    pos_leg = nth (varargin, va_arg_cnt++) ;
++    if (ischar(pos_leg))
++      pos_leg = 0;
++    endif;
++  endwhile;
++  
++  ## Change the legend position
++
++  if ((isscalar (pos_leg)) && (isreal(pos_leg)))
++    switch (pos_leg)
++      case 1
++        __gnuplot_raw__ ("set  key right top;\n")
++      case 2
++        __gnuplot_raw__ ("set  key left top;\n")
++      case 3
++        __gnuplot_raw__ ("set  key left bottom;\n")
++      case 4
++        __gnuplot_raw__ ("set  key right bottom;\n")
++      case -1
++        __gnuplot_raw__ ("set  key right top outside;\n")
++      case -2
++        __gnuplot_raw__ ("set  key right bottom outside;\n")
++      case -3
++        __gnuplot_raw__ ("set  key below;\n")
++      otherwise
++        warning ("incorrect pos");
++    endswitch;
++  elseif (isvector (pos_leg)) && (length (pos_leg) == 2) && \
++        (all(isreal(pos_leg)))
++    eval (sprintf ("__gnuplot_raw__ (\"set key %e, %e\")", pos_leg(1), pos_leg(2)));
++  else
++    warning ("pos must be a scalar");
++  endif;
++
++  ## Regenerate the plot
++
+   __gnuplot_replot__ 
+-
+-  
+-endfunction;
+-
+-%!demo
+-%! close all;
+-%! plot(1:10, 1:10);
+-%! title("a very long label can sometimes cause problems");
+-%! legend({"hello world"}, -1)
+-
+-%!demo
+-%! close all;
+-%! labels = {};
+-%! for i = 1:5
+-%!     plot(1:100, i + rand(100,1)); hold on;
+-%!     labels = {labels{:}, strcat("Signal ", num2str(i))};
+-%! endfor; hold off;
+-%! title("Signals with random offset and uniform noise")
+-%! xlabel("Sample Nr [k]"); ylabel("Amplitude [V]");
+-%! legend(labels, -1)
+-%! legend("boxon")
+-
+-
++
++  
++endfunction;
++
++%!demo
++%! close all;
++%! plot(1:10, 1:10);
++%! title("a very long label can sometimes cause problems");
++%! legend({"hello world"}, -1)
++
++%!demo
++%! close all;
++%! labels = {};
++%! for i = 1:5
++%!     plot(1:100, i + rand(100,1)); hold on;
++%!     labels = {labels{:}, strcat("Signal ", num2str(i))};
++%! endfor; hold off;
++%! title("Signals with random offset and uniform noise")
++%! xlabel("Sample Nr [k]"); ylabel("Amplitude [V]");
++%! legend(labels, -1)
++%! legend("boxon")
++
++

Added: trunk/packages/octave2.9-forge/debian/patches/50-pwelch-documentation.patch
===================================================================
--- trunk/packages/octave2.9-forge/debian/patches/50-pwelch-documentation.patch	                        (rev 0)
+++ trunk/packages/octave2.9-forge/debian/patches/50-pwelch-documentation.patch	2006-10-07 14:07:36 UTC (rev 775)
@@ -0,0 +1,98 @@
+*** octave2.9-forge-2006.07.09+dfsg1.orig/main/signal/pwelch.m	2006-09-07 17:03:11.000000000 +0200
+--- octave2.9-forge-2006.07.09+dfsg1/main/signal/pwelch.m	2006-09-18 11:17:26.445617704 +0200
+***************
+*** 14,21 ****
+  ## along with this program; if not, write to the Free Software
+  ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+  
+! ## usage: [Pxx, w] = pwelch(x,n,Fs,window,overlap,ci,range,units,trend)
+! ##        [Pxx, Pci, w] = pwelch(x,n,Fs,window,overlap,ci,range,units,trend)
+  ##
+  ## Estimate power spectrum of a stationary signal. This chops the signal
+  ## into overlapping slices, windows each slice and applies a Fourier
+--- 14,23 ----
+  ## along with this program; if not, write to the Free Software
+  ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+  
+! 
+! ## -*- texinfo -*-
+! ## @deftypefn {Function File} {[@var{Pxx}, @var{w}] =} pwelch (@var{x}, @var{n}, @var{Fs}, @var{window}, @var{overlap}, @var{ci}, @var{range}, @var{units}, @var{trend})
+! ## @deftypefnx {Function File} {[@var{Pxx}, @var{Pci}, @var{w}] =} pwelch(@dots{})
+  ##
+  ## Estimate power spectrum of a stationary signal. This chops the signal
+  ## into overlapping slices, windows each slice and applies a Fourier
+***************
+*** 23,48 ****
+  ## magnitudes of these slices are then averaged to produce the estimate Pxx.
+  ## The confidence interval around the estimate is returned in Pci.
+  ##
+! ## x: vector of samples
+! ## n: size of fourier transform window, or [] for default=256
+! ## Fs: sample rate, or [] for default=2 Hz
+! ## window: shape of the fourier transform window, or [] for default=hanning(n)
+! ##    Note: window length can be specified instead, in which case
+! ##    window=hanning(length)
+! ## overlap: overlap with previous window, or [] for default=length(window)/2
+! ## ci: confidence interval, or [] for default=0.95
+! ##    ci must be between 0 and 1; if ci is not passed, or if it is
+! ##    passed as 0, then no confidence intervals will be computed.
+! ## range: 'whole',  or [] for default='half'
+! ##    show all frequencies, or just half of the frequencies
+! ## units: 'squared', or [] for default='db'
+! ##    show results as magnitude squared or as log magnitude squared
+! ## trend: 'mean', 'linear', or [] for default='none'
+! ##    remove trends from the data slices before computing spectral estimates
+  ##
+! ## Example
+  ##    [b,a] = cheby1(4,3,[0.2, 0.4]);     ## define noise colour
+  ##    pwelch(filter(b,a,randn(2^12,1))); ## estimate noise colour
+  
+  ## 2001-04-02 Paul Kienzle
+  ##    * return nfft/2+1 elements rather than nfft/2 for even nfft.
+--- 25,70 ----
+  ## magnitudes of these slices are then averaged to produce the estimate Pxx.
+  ## The confidence interval around the estimate is returned in Pci.
+  ##
+! ## The input arguments are:
+! ##
+! ## @table @asis
+! ## @item @var{x}
+! ## vector of samples
+! ## @item @var{n} 
+! ## size of fourier transform window, or [] for default=256
+! ## @item @var{Fs} 
+! ## sample rate, or [] for default=2 Hz
+! ## @item @var{window} 
+! ## shape of the fourier transform window, or [] for default=hanning(n).
+! ## Note: window length can be specified instead, in which case
+! ## window=hanning(length)
+! ## @item @var{overlap}
+! ## overlap with previous window, or [] for default=length(window)/2
+! ## @item @var{ci}
+! ## confidence interval, or [] for default=0.95
+! ## @var{ci} must be between 0 and 1; if @var{ci} is not passed, or if it is
+! ## passed as 0, then no confidence intervals will be computed.
+! ## @var{range} 
+! ## The range of the spectrum calculation, can be either 'whole' or 'half'
+! ## (default 'half')
+! ## @item @var{units}   
+! ## show results as magnitude squared or as log magnitude squared. The valid
+! ## values can either be 'squared or 'db' (default 'db')
+! ## @item @var{trend}
+! ## remove trends from the data slices before computing spectral estimates. The
+! ## valid values can either be 'mean', 'linear' or 'none' (default 'none')
+! ## @end table
+! ##
+! ## Note that the string arguments @var{range}, @var{units} and @var{trend}
+! ## can be entered in any order. An example of the use of @code{pwelch} is
+  ##
+! ## @example
+! ## @group
+  ##    [b,a] = cheby1(4,3,[0.2, 0.4]);     ## define noise colour
+  ##    pwelch(filter(b,a,randn(2^12,1))); ## estimate noise colour
++ ## @end group
++ ## @end example
++ ## @end deftypefn
+  
+  ## 2001-04-02 Paul Kienzle
+  ##    * return nfft/2+1 elements rather than nfft/2 for even nfft.




More information about the Pkg-octave-commit mailing list