[Scilab-users] Finding data_bounds
Jens
j.s.strom at hslmg.de
Tue Mar 22 11:39:19 CET 2016
Hi,
I want to watch the buildup of subplots in a loop which adds further points
in each passage. To get a calm figure I set estimated data_bounds at the
beginning. At the end I would like to reshape the subplot so that it shows
all data. How can I extract the elements of data_bounds from the graphic
object?
The following minimal code should help to explain my problem.
xdel();
figure('BackgroundColor',[1 1 1]);
f1=gcf(); f1.figure_size=[1000 900]; f1.figure_position = [300,0];
subplot(2,3,1)//setting estimated plot bounds to maintain during loop
cafix=gca();
cafix.data_bounds = 5*[-1,-1;1,1];// estimated values before calculation
cafix.tight_limits="on";
cafix.auto_scale="off";
x=linspace(-5,5,10);//calculate and plot
for i=1:5
subplot(2,3,1)
plot(cafix,x,i*x/2)
//further calculations and subplots here
subplot(2,3,1)
plot(cafix,x,i*x/2,'-o')
//further calculations and subplots here
subplot(2,3,1)
plot(cafix,x,i*x/2,'-+')
end//for ...
sleep(2000)
//Now Scilab knows the extremal values which should become visible too
now if cropped.
subplot(2,3,1)
cafix.isoview="on";
cafix.axes_bounds = [0,0,0.4,0.4];
cafix.data_bounds = 13*[-1,-1;1,1];//These bounds are set by inspection
//How can adequate data_bounds be extracted from the graphic object?
Kind regards
Jens
--
View this message in context: http://mailinglists.scilab.org/Finding-data-bounds-tp4033814.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
More information about the users
mailing list