octave-maintainers
[Top][All Lists]
Advanced

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

Re: stem plot problem


From: Ben Abbott
Subject: Re: stem plot problem
Date: Fri, 17 Oct 2008 17:51:38 -0400

On Friday, October 17, 2008, at 02:45PM, "John W. Eaton" <address@hidden> 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

I don't think the problem is in __go_draw_axes__.m

If the last line of that demo is removed (the one below), there is no error.

%! set (h(1), "basevalue", -1)

I inserted the lines below ahead of the error

%! get(get(get (h(1),'children')(1), 'children'), 'xdata')
%! get(get(get (h(1),'children')(1), 'children'), 'ydata')
%! get(get(get (h(1),'children')(2), 'children'), 'xdata')
%! get(get(get (h(1),'children')(2), 'children'), 'ydata')

The 1st & 2nd produce a 1x11 vector
The 3rd & 4th produce a 1x33 vector

After examining the line that fails in __go_draw_axes__.m, it appears an 
attempt is made to plot the xdata from the 1st with the ydata from the 4th.

I'll have to bone up on what "basevalue" is before going any deeper.


The handle h(1) points to an hggroup. Looking at the lines of the group all the 
xdata and ydata appear to be correct. Once the set command gets run, I'm not 
sure what the sequence of events is.

Ben




reply via email to

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