1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2008-2008 - INRIA - Jean-Baptiste Silvy
4//
5//  This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// <-- TEST WITH GRAPHIC -->
9
10// <-- Non-regression test for bug 2722 -->
11//
12// <-- Bugzilla URL -->
13// http://bugzilla.scilab.org/show_bug.cgi?id=2722
14//
15// <-- Short Description -->
16// It is impossible to put the "box" graphics property to "off" before issuing a
17// plot or plot2d.
18
19dAxes = gda();
20dAxes.box="off";
21x=linspace(-%pi,%pi,100);
22plot2d(x,sin(x));
23axes = gca();
24// axes box should be off
25if (axes.box <> "off") then pause; end;
26
27// reset default model axes
28sda();
29clf();
30axes = gca();
31axes.box="off";
32x=linspace(-%pi,%pi,100);
33plot2d(x,sin(x));
34// axes box should be off
35if (axes.box <> "off") then pause; end
36
37// for plot
38sda();
39dAxes = gda();
40dAxes.x_location = "origin";
41dAxes.y_location = "origin";
42clf();
43plot(1:10);
44axes = gca();
45// box should be "off" since axes at at origin
46if (axes.box <> "off") then pause; end
47
48// for plot
49sda();
50clf();
51dAxes = gda();
52dAxes.x_location = "top";
53dAxes.y_location = "left";
54plot(1:10);
55axes = gca();
56// box should be "on"
57if (axes.box <> "on") then pause; end
58
59