Mercurial > octave
changeset 24385:c7f56bffe02f
maint: merge stable to default.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 07 Dec 2017 10:33:21 -0800 |
parents | 2798d4bd7147 (current diff) d8626fd6bb36 (diff) |
children | a164fd6e7e7b |
files | scripts/plot/util/private/__gnuplot_draw_axes__.m |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m Thu Dec 07 09:56:30 2017 -0800 +++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m Thu Dec 07 10:33:21 2017 -0800 @@ -2835,7 +2835,7 @@ endfunction -function retval = mapcdata (cdata, mode, clim, cmap_sz) +function cdata = mapcdata (cdata, mode, clim, cmap_sz) if (ndims (cdata) == 3) ## True Color, clamp data to 8-bit clim = double (clim); @@ -2847,8 +2847,6 @@ else cdata(:) = 255; endif - ## Scale using inverse of gnuplot's cbrange mapping - retval = 1 + cdata * (cmap_sz-1)/255; else if (islogical (cdata)) cdata += 1; @@ -2868,6 +2866,6 @@ cdata = fix (cdata); endif endif - retval = max (1, min (cdata, cmap_sz)); + cdata = max (1, min (cdata, cmap_sz)); endif endfunction