stem plot problem [changeset]
Ben Abbott
bpabbott at mac.com
Sat Oct 18 10:48:13 CDT 2008
On Oct 17, 2008, at 2:45 PM, John W. Eaton wrote:
> I'm seeing the following problem with the current development sources
> (this is demo 7 in stem.m):
>
> octave:1> x = [0:10].';
> octave:2> y = [sin(x), cos(x)];
> octave:3> h = stem (x, y);
> octave:4> set (h(2), "color", "g");
> octave:5> set (h(1), "basevalue", 1)
> error: number of rows must match (33 != 11) near line 468, column 33
> error: called from:
> error: /home/jwe/src/octave/scripts/plot/__go_draw_axes__.m at
> line 468, column 24
> error: /home/jwe/src/octave/scripts/plot/__go_draw_figure__.m at
> line 56, column 8
> error: /home/jwe/src/octave/scripts/plot/gnuplot_drawnow.m at
> line 68, column 5
>
> The problem appears to be this concatenation at line 465 in
> __go_draw_axes__.m:
>
> data{data_idx} = [xdat, ydat]';
>
> Again, I don't understand what is supposed to be happening, or why
> xdat has 11 elements and ydat has 33 at this point. I could use
> some help fixing this problem.
>
> jwe
Ok, taking a fresh look at __stem__.m this morning the problem was
quite clear.
The subfunction "move_baseline" presumed the old ordering of children.
Recently the order was changed so that the kids(end) are the elder and
kids(1) the youger. The attached trivial changeset fixes the problem.
Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changeset-__stem__.patch
Type: application/octet-stream
Size: 1085 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20081018/2a5ea35c/attachment.obj
-------------- next part --------------
More information about the Octave-maintainers
mailing list