view NEWS @ 6469:a848b846cb3a ss-2-9-10

[project @ 2007-03-27 18:42:11 by jwe]
author jwe
date Tue, 27 Mar 2007 18:42:11 +0000
parents 5fb50197b69a
children 30891d1d0c86
line wrap: on
line source

Summary of important user-visible changes for version 3.0:
---------------------------------------------------------

 ** Compatibility with Matlab graphics is much better now.  We now
    have some graphics features that work like Matlab's Handle
    Graphics (tm):

    + You can make a subplot and then use the print function to
      generate file with the plot.

    + RGB line colors are supported if you use gnuplot 4.2.  Octave
      can still use gnuplot 4.0, but there is no way to set arbitrary
      line colors with it when using the Matlab-style plot functions.
      There never was any way to do this reliably with older versions
      of gnuplot (whether run from Octave or not) since it only
      provided a limited set to choose from, and they were terminal
      dependent, so choosing color 1 with the X11 terminal would be
      different from color 1 with the PostScript terminal.  Valid RGB
      colors for gnuplot 4.0 are the eight possible combinations of 0
      and 1 for the R, G and B values. Invalid values are all mapped
      to the same color.

    + You can control the width of lines using (for example):

	line (x, y, "linewidth", 4, "color", [1, 0, 0.5]);

      (this also shows the color feature).

    + With gnuplot 4.2, image data is plotted with gnuplot and may be
      combined with other 2-d plot data.

    + Lines for contour plots are generated with an Octave function, so
      contour plots are now 2-d plots instead of special 3-d plots, and
      this allows you to plot additional 2-d data on top of a contour
      plot.

    + It is no longer possible to mix Matlab-style plot commands with
      the old (and now considered obsolete) style of plot commands
      (__gnuplot_set__, etc.).  You can do one or the other, but not
      both for the same plot.

    + Plot property values are not extensively checked.  Specifying
      invalid property values may produce unpredictible results.


 ** The way Octave handles search paths has changed.  Instead of
    setting the built-in variable LOADPATH, you must use addpath,
    rmpath, or path to manipulate the function search path.  These
    functions will maintain "." at the head of the path, for
    compatibility with Matlab.

    Leading, trailing or doubled colons are no longer special.
    Now, all elements of the search path are explicitly included in
    the path when Octave starts.  To display the path, use the path
    function.

    Path elements that end in // are no longer searched recursively.
    Instead, you may use addpath and the genpath function to add an
    entire directory tree to the path.  For example,

      addpath (genpath ("~/octave"));

    will add ~/octave and all directories below it to the head of the
    path.


 ** Previous versions of Octave had a number of built-in variables to
    control warnings (for example, warn_divide_by_zero).  These
    variables have been replaced by warning identifiers that are used
    with the warning function to control the state of warnings.

    For example, instead of writing

      warn_divide_by_zero = false;

    to disable divide-by-zero warnings, you should write

      warning ("off", "Octave:divide-by-zero");

    You may use the same technique in your own code to control
    warnings.  For example, you can use

      warning ("My-package:phase-of-the-moon",
               "the phase of the moon could cause trouble today");

    to allow users to control this warning using the
    "My-package:phase-of-the-moon" warning identifier.

    You may also enable or disable all warnings, or turn them into
    errors:

      warning ("on", "all");
      warning ("off", "all");
      warning ("error", "Octave:divide-by-zero");
      warning ("error", "all");

    You can query the state of current warnings using

      warning ("query", ID)
      warning ("query")

    (only those warning IDs which have been explicitly set are
    returned).

    A partial list and description of warning identifiers is available
    using

      help warning_ids


 ** All built-in variables have been converted to functions.  This
    change simplifies the interpreter and allows a consistent
    interface to internal variables for user-defined packages and the
    core functions distributed with Octave.  In most cases, code that
    simply accesses internal variables does not need to change.  Code
    that sets internal variables will change.  For example, instead of
    writing

      PS1 = ">> ";

    you will need to write

      PS1 (">> ");

    If you need write code that will run in both old and new versions
    of Octave, you can use something like

      if (exist ("OCTAVE_VERSION") == 5)
        ## New:
        PS1 (">> ");
      else
        ## Old:
        PS1 = ">> ";
      endif


 ** For compatibility with Matlab, the output order of Octave's
    "system" function has changed from

      [output, status] = system (cmd);

    to

      [status, output] = system (cmd);


See NEWS.2 for old news.