octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars
Date: Thu, 28 Sep 2017 19:12:38 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #14, bug #52135 (project octave):

The examples work, but it may have broken this case:


octave:4> h = bar ([1 2], [3 4])
error: bar: length of X and Y must be equal
error: called from
    __bar__ at line 123 column 5
    bar at line 118 column 16


Maybe this test:


  ngrp = rows (x);
  if (ngrp != rows (y))
    error ("%s: length of X and Y must be equal", func);
  endif
-verbatim_

needs to be on cols(y) rather than rows(y).  Also, there is a rows() here
after swapping x and y that should be double checked (should it be y = x.'?):


    if (isscalar (y) && ! isscalar (x))
      ## "y" is actually "width" argument
      y = x;
      x = [1:rows(y)]';
      idx = 2;


I'm out for a while, but the essence of the patch is good.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52135>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]