changeset 12494:ce831dc80bdb

small optimization in subplot.m
author Konstantinos Poulios <logari81@gmail.com>
date Wed, 02 Mar 2011 18:03:32 +0100
parents c5a2ad173d4d
children 4675ce154a55
files scripts/ChangeLog scripts/plot/subplot.m
diffstat 2 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Tue Mar 01 19:55:57 2011 -0500
+++ b/scripts/ChangeLog	Wed Mar 02 18:03:32 2011 +0100
@@ -1,3 +1,8 @@
+2011-03-02  Konstantinos Poulios  <logari81@gmail.com>
+
+	* plot/subplot.m: Remove redundant calls.
+	For gnuplot set "activepositionproperty" to "position" always.
+
 2010-03-01  Rik  <octave@nomad.inbox5.com>
 
 	* general/isscalar.m, general/isvector.m: Use modern warning function
--- a/scripts/plot/subplot.m	Tue Mar 01 19:55:57 2011 -0500
+++ b/scripts/plot/subplot.m	Wed Mar 02 18:03:32 2011 +0100
@@ -170,17 +170,13 @@
 
     if (found)
       set (cf, "currentaxes", tmp);
-      position = get (tmp, "position");
-      outerposition = get (tmp, "outerposition");
     else
-      outerposition = subplot_position (rows, cols, index, "outerposition");
-      position = subplot_position (rows, cols, index, "position");
+      outpos = subplot_position (rows, cols, index, "outerposition");
       tmp = axes ("looseinset", [0 0 0 0], "box", "off",
-                  "outerposition", outerposition,
-                  "position", position);
+                  "outerposition", outpos, "position", pos);
     endif
 
-    if (align_axes && strcmp (get (cf, "__graphics_toolkit__"), "gnuplot"))
+    if (align_axes || strcmp (get (cf, "__graphics_toolkit__"), "gnuplot"))
       set (tmp, "activepositionproperty", "position");
     endif