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: John W. Eaton
Subject: Re: Octave-3.3.55 and Octave-3.3.90 on OSX
Date: Sun, 30 Jan 2011 13:04:22 -0500

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


reply via email to

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