octave-maintainers
[Top][All Lists]
Advanced

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

Re: Octave-3.3.55 and Octave-3.3.90 on OSX


From: Richard Campbell
Subject: Re: Octave-3.3.55 and Octave-3.3.90 on OSX
Date: Sun, 30 Jan 2011 13:10:08 -0500

On Jan 30, 2011, at 1:04 PM, John W. Eaton wrote:

> On 30-Jan-2011, Richard Campbell wrote:
> 
> | It's just a line plot. I pasted it in an earlier message in this thread. I 
> get
> | the same error when trying to print if I had typed surf(peaks) as well. It
> | plots fine on the screen, I just can't print it to a file.
> | 
> | octave:1> plot(randn(10,1))
> | octave:2> print('-dpng','test.png')
> | warning: print.m: fig2dev binary is not available
> | error: invalid assignment to cs-list outside multiple assignment
> | error: matrix cannot be indexed with {
> | error: evaluating argument list element number 3
> | error: called from:
> | error:   /Users/campbell/Downloads/octave-3.3.90/scripts/plot/print.m at 
> line
> | 390, column 11
> | octave:2> print('-depsc','test.eps')
> | error: invalid assignment to cs-list outside multiple assignment
> | error: matrix cannot be indexed with {
> | error: evaluating argument list element number 3
> | error: called from:
> | error:   /Users/campbell/Downloads/octave-3.3.90/scripts/plot/print.m at 
> line
> | 390, column 11
> | octave:2> print('-dtiff','test.tiff')
> | error: invalid assignment to cs-list outside multiple assignment
> | error: matrix cannot be indexed with {
> | error: evaluating argument list element number 3
> | error: called from:
> | error:   /Users/campbell/Downloads/octave-3.3.90/scripts/plot/print.m at 
> line
> | 390, column 11
> | 
> 
> In 3.3.90, line 390 of print.m is
> 
>    ## restore modified properties
>    if (isstruct (props))
>      for n = 1:numel(props)
>        if (ishandle (props(n).h))
>          set (props(n).h, props(n).name, props(n).value{1});  <<< line 390
>        endif
>      endfor
>    endif
> 
> Try this in Octave:
> 
>  dbstop print 390
>  peaks
>  print ('-depsc', 'test.eps')
> 
> then when you get the "debug>" prompt, try looking at the following
> items:
> 
>  numel (props)
>  props
>  props(1)
>  props(2)
> 
> Here is what I see:
> 
>  debug> numel (props)
>  ans =  2
>  debug> props
>  props =
> 
>    1x2 struct array containing the fields:
> 
>      h
>      name
>      value
> 
>  debug> props(1)
>  ans =
> 
>    scalar structure containing the fields:
> 
>      h =  1
>      name = position
>      value = 
>      {
>        [1,1] =
> 
>           300   200   560   420
> 
>      }
> 
>  debug> props(2)
>  ans =
> 
>    scalar structure containing the fields:
> 
>      h =  1
>      name = color
>      value = 
>      {
>        [1,1] =
> 
>           1   1   1
> 
>      }
> 
> I guess you don't have the same props(?).value.  If not, then why is
> it not set correctly?  You can do
> 
>  dbstop print
>  peaks
>  print ('-depsc', 'test.eps')
> 
> and then step through print.m with dbstep to see where  props(?).value
> is set.  Note that after you type a command at the debug prompt,
> pressing the Enter by itself will repeat the previous command, so
> stepping is easy.
> 
> jwe


octave:1> dbstop print 390
ans =  390
octave:2> peaks
octave:3> print('-depsc', 'test.eps');
warning: print.m: fig2dev binary is not available
error: invalid assignment to cs-list outside multiple assignment
stopped in /Users/campbell/Downloads/octave-3.3.90/scripts/plot/print.m at line 
390
390:           set (props(n).h, props(n).name, props(n).value{1});
debug> numel(props)
ans =  2
debug> props
props =

  1x2 struct array containing the fields:

    h
    name
    value

debug> props(1)
ans =

  scalar structure containing the fields:

    h =  1
    name = position
    value = 
    {
      [1,1] =

         300   200   560   420

    }

debug> props(2)
ans =

  scalar structure containing the fields:

    h =  1
    name = [](0x0)
    value = [](0x0)


and then while dbstepping through print.m:

debug> dbstep
stopped in /Users/campbell/Downloads/octave-3.3.90/scripts/plot/print.m at line 
297
297:     props(2).h = opts.figure;
debug> dbstep
stopped in /Users/campbell/Downloads/octave-3.3.90/scripts/plot/print.m at line 
298
298:     props(2).name = "color";
debug> dbstep
error: invalid assignment to cs-list outside multiple assignment
stopped in /Users/campbell/Downloads/octave-3.3.90/scripts/plot/print.m at line 
387
387:     if (isstruct (props))



reply via email to

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