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// <-- TEST WITH GRAPHIC --> 8// <-- Non-regression test for bug 2722 --> 9// 10// <-- Bugzilla URL --> 11// http://bugzilla.scilab.org/show_bug.cgi?id=2722 12// 13// <-- Short Description --> 14// It is impossible to put the "box" graphics property to "off" before issuing a 15// plot or plot2d. 16dAxes = gda(); 17dAxes.box="off"; 18x=linspace(-%pi,%pi,100); 19plot2d(x,sin(x)); 20axes = gca(); 21// axes box should be off 22if (axes.box <> "off") then bugmes();quit;end; 23// reset default model axes 24sda(); 25clf(); 26axes = gca(); 27axes.box="off"; 28x=linspace(-%pi,%pi,100); 29plot2d(x,sin(x)); 30// axes box should be off 31if (axes.box <> "off") then bugmes();quit;end 32// for plot 33sda(); 34dAxes = gda(); 35dAxes.x_location = "origin"; 36dAxes.y_location = "origin"; 37clf(); 38plot(1:10); 39axes = gca(); 40// box should be "off" since axes at at origin 41if (axes.box <> "off") then bugmes();quit;end 42// for plot 43sda(); 44clf(); 45dAxes = gda(); 46dAxes.x_location = "top"; 47dAxes.y_location = "left"; 48plot(1:10); 49axes = gca(); 50// box should be "on" 51if (axes.box <> "on") then bugmes();quit;end 52