Mercurial > octave
changeset 22343:029c5f4eac3a
rgbplot.m: Don't use Octave-only plot() syntax.
* rgbplot.m: Call plot (x,y,'color', ...) rather than plot (y, 'color', ...)
Use double quotes instead of single quotes.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 18 Aug 2016 12:26:32 -0700 |
parents | 609403f90bb7 |
children | 046ade63abc4 |
files | scripts/image/rgbplot.m |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/image/rgbplot.m Thu Aug 18 12:17:14 2016 -0700 +++ b/scripts/image/rgbplot.m Thu Aug 18 12:26:32 2016 -0700 @@ -29,7 +29,7 @@ ## @item profile (default) ## Plot the RGB line profile of the colormap for each of the channels (red, ## green and blue) with the plot lines colored appropriately. Each line -## represents the intensity of each RGB components across the colormap. +## represents the intensity of an RGB component across the colormap. ## ## @item composite ## Draw the colormap across the X-axis so that the actual index colors are @@ -58,12 +58,13 @@ switch (tolower (style)) case "profile" - htmp = plot (cmap(:,1),"r", cmap(:,2),"g", cmap(:,3),"b"); - set (gca (), 'ytick', 0:0.1:1); - set (gca (), 'xlim', [0 rows(cmap)]); + x = 1:rows (cmap); + htmp = plot (x,cmap(:,1),"r", x,cmap(:,2),"g", x,cmap(:,3),"b"); + set (gca (), "ytick", 0:0.1:1); + set (gca (), "xlim", [0 rows(cmap)]); case "composite" - htmp = image (1:rows(cmap)); - set (gca, 'ytick', []); + htmp = image (1:rows (cmap)); + set (gca, "ytick", []); colormap (cmap); otherwise error ("rgbplot: unknown style '%s'", style);