[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 04:49:30 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Follow-up Comment #1, bug #52135 (project octave):
Confirmed. Printing out some info:
octave:2> bar ([1, 2], [3, 4; 5, 6], 'stacked')
x =
1
2
y =
3 4
5 6
args = {}(0x0)
args = {}(0x0)
args = {}(0x0)
args = {}(0x0)
looks fine, but not so here:
octave:3> bar (1, [3, 4]', 'stacked')
x = 1
y = 1
args =
{
[1,1] =
3
4
[1,2] = stacked
}
args =
{
[1,1] =
3
4
[1,2] = stacked
}
error: wrong type argument 'matrix'
error: set: argument 0 must be a property name
error: called from
__bar__>bars at line 341 column 7
__bar__ at line 199 column 12
bar at line 118 column 16
octave:3>
In the code, because the number of rows (after transpose) of y doesn't equal
that of x, the assumption is that the first argument is the Y (type "help bar"
for first item on the list of valid formats). As a consequence, the code than
treats the second argument as a property of sorts, and that's what the error
message pertains to, i.e., [3 4]' is not a character string no less a property
name.
So, the existence of 'stacked' needs to be checked first prior to processing
the data input variations. It might be kind of tricky though, in the sense
that the user might be able to switch 'barlayout' between stacked|grouped.
Have to think about what that means if the data is specified in a way that
implicitly describes what could only be "stacked" layout.
_______________________________________________________
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, Marco Caliari, 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/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, 2017/09/28