nicholschart should not change data_bounds 45/14245/2
Bruno JOFRET [Mon, 31 Mar 2014 12:01:31 +0000 (14:01 +0200)]
Change-Id: Ia1c07eb352ec009150c37a5da03a1f78d530f92e

scilab/modules/cacsd/macros/nicholschart.sci

index 6c72596..3172305 100644 (file)
@@ -18,6 +18,7 @@ function nicholschart(modules,args,colors)
     fig.immediate_drawing="off";
 
     ax=gca();
+    old_data_bounds = ax.data_bounds;
     nc=size(ax.children,"*")
     if nc==0 then
         ax.data_bounds=[-360,-40;0,40];
@@ -185,4 +186,11 @@ function nicholschart(modules,args,colors)
     end
 
     fig.immediate_drawing=immediate_drawing;
+
+    // reset data_bounds
+    if rhs == 0 then
+        ax.data_bounds=[-360,-40;0,40];
+    else
+        ax.data_bounds = old_data_bounds;
+    end
 endfunction