[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:17:52 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Follow-up Comment #15, bug #52135 (project octave):
I agree that there is some question as to what is actually a grouped versus
conventional bar graph in the vector case.
But the patch you created is close. I think the issue is that you haven't
covered every instance of rows/cols with the new mod. My previous post had a
"verbatim" issue, so I'm reposting.
The examples work, but it may have broken this case [similar to bar(1:10)]:
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
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;
_______________________________________________________
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, 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, 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, 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 <=
- [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