# HG changeset patch # User Rik # Date 1400875497 25200 # Node ID d99475e26c787f2e41a2b458bf79a4d715399ecd # Parent ac0c04e4d141dee5f98c3a0bd7b4e4c603f17174 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. diff -r ac0c04e4d141 -r d99475e26c78 scripts/plot/draw/private/__bar__.m --- a/scripts/plot/draw/private/__bar__.m Fri May 23 11:48:23 2014 -0700 +++ b/scripts/plot/draw/private/__bar__.m Fri May 23 13:04:57 2014 -0700 @@ -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