changeset 29108:5fc28dab0b2b

Document new long forms of color spec argument to plot. * NEWS: Announce long forms in Matlab Compatibility section. * plot.m: Add long forms to table of color specifications for FMT argument. Re-phrase documentation on including legend labels.
author Rik <rik@octave.org>
date Thu, 26 Nov 2020 21:28:18 -0800
parents f8afcf772ba0
children 44c253973f0f
files NEWS scripts/plot/draw/plot.m
diffstat 2 files changed, 24 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Thu Nov 26 18:39:22 2020 -0800
+++ b/NEWS	Thu Nov 26 21:28:18 2020 -0800
@@ -133,6 +133,11 @@
 - The function `importdata` now produces more compatible results when
 the file contains a 2-D text matrix.
 
+- The `FMT` format argument for plot commands now accepts long forms for
+color names which may be more understandable than the existing
+one-letter codes.   For example, the RGB value `[0 0 0]` can now be
+specified by "black" in addition to "k". 
+
 - `uicontrol` objects now fully implement the "Off" and "Inactive"
 values of the "Enable" property.  When the value is "Off", no
 interaction with the object occurs and the `uicontrol` changes color
@@ -147,6 +152,12 @@
 previous versions of Octave, these functions returned an `hggroup` of
 patch graphics objects for all graphics toolkits.
 
+- The functions `bar` and `barh` now handle stacked negative bar values
+in a Matlab-compatible manner.  Negative values now stack below the zero
+axis independently of a positive value bars in the same stack.
+Previously the negative bars could overlap positive bars depending on
+drawing order.
+
 - The function `saveas` now defaults to saving in Octave figure format
 (.ofig) rather than PDF (.pdf).
 
@@ -155,12 +166,6 @@
 Matlab code, but for which Octave does not yet implement the
 functionality.  By default, this warning is enabled.
 
-- The functions `bar` and `barh` now handle stacked negative bar values
-in a Matlab-compatible manner.  Negative values now stack below the zero
-axis independently of a positive value bars in the same stack.
-Previously the negative bars could overlap positive bars depending on
-drawing order.
-
 ### Alphabetical list of new functions added in Octave 7
 
 * `getpixelposition`
--- a/scripts/plot/draw/plot.m	Thu Nov 26 18:39:22 2020 -0800
+++ b/scripts/plot/draw/plot.m	Thu Nov 26 21:28:18 2020 -0800
@@ -152,24 +152,26 @@
 ##
 ## @item color
 ##
-## @multitable @columnfractions 0.06 0.94
-## @item @samp{k} @tab blacK
-## @item @samp{r} @tab Red
-## @item @samp{g} @tab Green
-## @item @samp{b} @tab Blue
-## @item @samp{y} @tab Yellow
-## @item @samp{m} @tab Magenta
-## @item @samp{c} @tab Cyan
-## @item @samp{w} @tab White
+## @multitable @columnfractions 0.21 0.79
+## @item @samp{k}, @qcode{"black"}   @tab blacK
+## @item @samp{r}, @qcode{"red"}     @tab Red
+## @item @samp{g}, @qcode{"green"}   @tab Green
+## @item @samp{b}, @qcode{"blue"}    @tab Blue
+## @item @samp{y}, @qcode{"yellow"}  @tab Yellow
+## @item @samp{m}, @qcode{"magenta"} @tab Magenta
+## @item @samp{c}, @qcode{"cyan"}    @tab Cyan
+## @item @samp{w}, @qcode{"white"}   @tab White
 ## @end multitable
 ##
 ## @item @qcode{";displayname;"}
-## Here @qcode{"displayname"} is the label to use for the plot legend.
+## The text between semicolons is used to set the @qcode{"displayname"}
+## property which determines the label used for the plot legend.
+##
 ## @end table
 ##
 ## The @var{fmt} argument may also be used to assign legend labels.
 ## To do so, include the desired label between semicolons after the
-## formatting sequence described above, e.g., @qcode{"+b;Key Title;"}.
+## formatting sequence described above, e.g., @qcode{"+b;Data Series 3;"}.
 ## Note that the last semicolon is required and Octave will generate
 ## an error if it is left out.
 ##