[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 17:34:55 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Follow-up Comment #10, bug #52135 (project octave):
I can go along with that interpretation of bar(Y, width).
But there are a few things wrong with the patch.
The main thing is my original point that the data saved in the newly created
property
addproperty ("ydata", hg, "data", y(:, i));
addlistener (hg, "xdata", @update_data);
addlistener (hg, "ydata", @update_data);
cannot be conditioned on "stack", i.e., your line
elseif (ischar (varargin{idx}) && strcmpi (varargin{idx}, "stacked"))
group = false;
+ if (isvector (y))
+ y = y.';
+ endif
turns a column vector into a row vector. It has to be the same format
convention regardless of "stack" or "grouped" because after the initial
"bar()" we should be allowed to change back and forth between the "barlayout"
property.
As a consequence, there is this result with the patch:
octave:13> h = bar (1, [3 4], 'grouped')
error: bar: length of X and Y must be equal
error: called from
__bar__ at line 120 column 5
bar at line 118 column 16
Some other strange behavior (probably not unique to your patch):
octave:16> h = bar ('ae', [3 4]')
error: invalid value for array property "xdata"
error: called from
__bar__>bars at line 323 column 7
__bar__ at line 200 column 12
bar at line 118 column 16
produces a plot. Maybe we should also check to make sure the first argument
is numeric and not a string.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52135>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, (continued)
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Dan Sebald, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Marco Caliari, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Rik, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Rik, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Rik, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Dan Sebald, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Dan Sebald, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Dan Sebald, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Dan Sebald, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Rik, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars,
Dan Sebald <=
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Dan Sebald, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Rik, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Rik, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Dan Sebald, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Dan Sebald, 2017/09/28
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Marco Caliari, 2017/09/29
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Rik, 2017/09/29
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Dan Sebald, 2017/09/29
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Dan Sebald, 2017/09/29
- [Octave-bug-tracker] [bug #52135] bar cannot plot two stacked bars, Rik, 2017/09/30