octave-maintainers
[Top][All Lists]
Advanced

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

Re: Problem with Ben's change to preserve axis propers when used with co


From: David Bateman
Subject: Re: Problem with Ben's change to preserve axis propers when used with colorbars
Date: Thu, 16 Oct 2008 21:19:10 +0100
User-agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724)

Ben Abbott wrote:
I translated the Octave syntax to respect Matlab's. Running Matlab 2008a ..

for i = [1,2]; disp('X:'); i, end
X:

i =

     1

X:

i =

     2

for i = [1;2]; disp('X:'); i, end
X:

i =

     1
     2

Ben


Ok, then the for-loop code in pt-loop.cc is correct and subplot.m should be modified as attached.

D.


--
David Bateman                                address@hidden
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)
# HG changeset patch
# User David Bateman <address@hidden>
# Date 1224188267 -3600
# Node ID 2c5f2fddb01f8f1d13f08d5c8cd168df706f853c
# Parent  457e99665c5661bdc452690c496d2350c3bf7bbb
Fix subplot for column vector of children in figure

diff --git a/scripts/ChangeLog b/scripts/ChangeLog
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2008-10-16  David Bateman  <address@hidden>
+
+       * plot/subplot.m: Allow for column vector of children for figure.
+
 2008-10-16  Ben Abbott <address@hidden>
 
        * plot/contourf.m: Correct order of patch object handles.
@@ -8,7 +12,8 @@
        the axes.
 
        * plot/newplot.m: Don't preserve axes properties here, but rather
-       do it in the graphics handle code so that the preservation can be
+       do it in the gr
+       aphics handle code so that the preservation can be
        done after callbacks are executed.
        
        * plot/__go_draw_axes__.m: If current plot is an image, don't flag
diff --git a/scripts/plot/subplot.m b/scripts/plot/subplot.m
--- a/scripts/plot/subplot.m
+++ b/scripts/plot/subplot.m
@@ -117,7 +117,8 @@
   set (cf, "nextplot", "add");
 
   found = false;
-  for child = get (cf, "children")
+  kids = get(cf, "children");
+  for child = reshape(kids, 1, numel (kids))
     ## Check whether this child is still valid; this might not be the
     ## case anymore due to the deletion of previous children (due to
     ## "deletefcn" callback or for legends/colorbars that are deleted

reply via email to

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