octave-maintainers
[Top][All Lists]
Advanced

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

Re: 2.9.9?


From: David Bateman
Subject: Re: 2.9.9?
Date: Tue, 26 Sep 2006 17:02:23 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

David Bateman wrote:
> John W. Eaton wrote:
>   
>> On 26-Sep-2006, David Bateman wrote:
>>
>> | John W. Eaton wrote:
>> | > Are there any pending bugs that should be fixed or any other reasons
>> | > to delay a new snapshot?
>> | >
>> | > Thanks,
>> | >
>> | > jwe
>> | >
>> | >   
>> | I'd hoped to have eigs ready, but I still have a rare seg-fault to
>> | address. When were you thinking of doing the release? By the weekend I
>> | hope to have eigs in a better shape.
>>
>> I can wait a short while, but would like to make a new snapshot by
>> next week at least.
>>
>> jwe
>>
>>   
>>     
> There is one bug that was identify in 2.9.8 that I don't believe is
> fixed yet. The fact that plot3 and mesh are ignoring the "hold on" I
> looked at this and the problem appears to be in __gnuplot_splot__ itself
> as running
>
>     __gnuplot_set__ parametric;
>     __gnuplot_raw__ ("set nohidden3d;\n");
>
> and then running
>
> x = rand(10,1);
> y = rand(10,1);
> z = rand(10,1);
> tmp = [([x; NaN*ones(1,size(x,2))])(:),([y;
> NaN*ones(1,size(y,2))])(:),([z; NaN*ones(1,size(z,2))])(:)];
>
> __gnuplot_splot__ tmp
>
> multiple times doesn't result in multiple plots on the same figure.
> However, its really not obvious to me why this is happening.
>
> D.
>
>   
Ok I believe the following fixes this issue.

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary

*** scripts/plot/__plt3__.m.~1.2.~      2006-06-01 22:23:53.000000000 +0200
--- scripts/plot/__plt3__.m     2006-09-26 16:54:42.720821089 +0200
***************
*** 33,39 ****
  ## David Bateman <address@hidden>
  ## May 25, 2006
  
! function __plt3__ (x, y, z, fmt)
  
    if (isvector (x) && isvector (y))
      if (isvector (z))
--- 33,57 ----
  ## David Bateman <address@hidden>
  ## May 25, 2006
  
! function __plt3__ (x, y, z, fmtstr)
! 
!   __plot_globals__;
! 
!   if (ishold ())
!     if (isempty 
(__plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}))
!       __plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__} 
= "__gnuplot_splot__";
!       __plot_command_sep__ = "";
!     else
!       __plot_command_sep__ = ",\\\n";
!     endif
!   else
!     __plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__} = 
"__gnuplot_splot__";
!     __plot_command_sep__ = "";
!     __plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__} = [];
!     
__plot_data_offset__{__current_figure__}(__multiplot_xi__,__multiplot_yi__) = 1;
!   endif
! 
!   j = 
__plot_data_offset__{__current_figure__}(__multiplot_xi__,__multiplot_yi__);
  
    if (isvector (x) && isvector (y))
      if (isvector (z))
***************
*** 51,66 ****
      error ("plot3: x, y, and z must have the same shape");
    endif
  
    unwind_protect
      __gnuplot_set__ parametric;
      __gnuplot_raw__ ("set nohidden3d;\n");
  
!     tmp = [([x; NaN*ones(1,size(x,2))])(:), ...
!          ([y; NaN*ones(1,size(y,2))])(:), ...
!          ([z; NaN*ones(1,size(z,2))])(:)];
  
!     eval (sprintf ("__gnuplot_splot__ tmp %s\n", fmt));
    unwind_protect_cleanup
      __gnuplot_set__ noparametric; 
    end_unwind_protect
  endfunction
--- 69,123 ----
      error ("plot3: x, y, and z must have the same shape");
    endif
  
+   __plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{j} = 
...
+       [([x; NaN*ones(1,size(x,2))])(:), ...
+        ([y; NaN*ones(1,size(y,2))])(:), ...
+        ([z; NaN*ones(1,size(z,2))])(:)];
+ 
+   if (iscell 
(__plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{j}))
+     for i = 1:length 
(__plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{j})
+       usingstr = make_using_clause 
(__plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{j}{i});
+       __plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__} 
\
+         = sprintf ("%s%s 
__plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{%d}{%d} %s 
%s",
+                    
__plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__},
+                    __plot_command_sep__, j, i, usingstr, fmtstr{i});
+       __plot_command_sep__ = ",\\\n";
+     endfor
+   else
+     usingstr = make_using_clause 
(__plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{j});
+     __plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__} \
+       = sprintf ("%s%s 
__plot_data__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}{%d} %s %s",
+                  
__plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__},
+                  __plot_command_sep__, j, usingstr, fmtstr);
+     __plot_command_sep__ = ",\\\n";
+   endif
+ 
+   __plot_data_offset__{__current_figure__}(__multiplot_xi__,__multiplot_yi__) 
= ++j;
+ 
    unwind_protect
      __gnuplot_set__ parametric;
      __gnuplot_raw__ ("set nohidden3d;\n");
  
!     if (__multiplot_mode__)
!       __gnuplot_raw__ ("clear\n");
!     endif
  
!     if (! strcmp 
(__plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__}, 
"__gnuplot_splot__"))
!       eval 
(__plot_command__{__current_figure__}{__multiplot_xi__,__multiplot_yi__});
!     endif
    unwind_protect_cleanup
      __gnuplot_set__ noparametric; 
    end_unwind_protect
  endfunction
+ 
+ function usingstr = make_using_clause (x)
+   cols = columns (x);
+   if (cols > 0)
+     usingstr = strcat (gnuplot_command_using, " ($1)");
+     for k = 2:cols
+       usingstr = sprintf ("%s:($%d)", usingstr, k);
+     endfor
+   else
+     usingstr = "";
+   endif
+ ## endfunction

reply via email to

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