Mercurial > hg > octave-nkf
changeset 18965:d99475e26c78 stable
Fix regression in width of bars for hist() (bug #42401).
* __bar__.m: For 'hist' styles with only a single bar, set group width to 1 so
that bars will touch.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 23 May 2014 13:04:57 -0700 |
parents | ac0c04e4d141 |
children | 9040ad7feb35 |
files | scripts/plot/draw/private/__bar__.m |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/draw/private/__bar__.m +++ b/scripts/plot/draw/private/__bar__.m @@ -120,13 +120,17 @@ nbars = columns (y); - ## Column width is 1 for 'hist*' styles. Otherwise, same as group width. - if (nbars == 1) + ## Column width is 1 for 'hist*' styles (bars touch). + if (islogical (histc)) + cwidth = 1; + if (nbars == 1) + gwidth = 1; + else + gwidth = width^2; + endif + elseif (nbars == 1) cwidth = 1; gwidth = width; - elseif (islogical (histc)) - cwidth = 1; - gwidth = width^2; else cwidth = gwidth = width; endif