1// ============================================================================= 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3// Copyright (C) 2009-2009 - Digiteo - Allan CORNET 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 1109 --> 9// 10// <-- Bugzilla URL --> 11// http://bugzilla.scilab.org/show_bug.cgi?id=1109 12// 13// <-- Short Description --> 14// Argument axesflag=2 does not work with plot2d 15// 16// check all possible combinations 17x = 1:10; 18// axesflag=0 nothing around the plot 19clf(); 20plot2d(x, x, axesflag=0); 21axes = gca(); 22if (axes.axes_visible <> ["off","off","off"]) then bugmes();quit;end 23if (axes.box <> "off") then bugmes();quit;end; 24// axesflag=1: axes + box + y left 25clf(); 26plot2d(x, x, axesflag=1); 27axes = gca(); 28if (axes.axes_visible <> ["on","on","on"]) then bugmes();quit;end 29if (axes.box <> "on") then bugmes();quit;end; 30if (axes.y_location <> "left") then bugmes();quit;end 31// axesflag=2: box + no axes 32clf(); 33plot2d(x, x, axesflag=2); 34axes = gca(); 35if (axes.axes_visible <> ["off","off","off"]) then bugmes();quit;end 36if (axes.box <> "on") then bugmes();quit;end; 37// axesflag=3: axes + !box + y right 38clf(); 39plot2d(x, x, axesflag=3); 40axes = gca(); 41if (axes.axes_visible <> ["on","on","on"]) then bugmes();quit;end 42if (axes.box <> "off") then bugmes();quit;end; 43if (axes.y_location <> "right") then bugmes();quit;end 44// axesflag=4: axes + x centered + y centered 45clf(); 46plot2d(x, x, axesflag=4); 47axes = gca(); 48if (axes.axes_visible <> ["on","on","on"]) then bugmes();quit;end 49if (axes.x_location <> "middle") then bugmes();quit;end 50if (axes.y_location <> "middle") then bugmes();quit;end 51// axesflag=5: axes + box + x centered + y centered 52clf(); 53plot2d(x, x, axesflag=5); 54axes = gca(); 55if (axes.axes_visible <> ["on","on","on"]) then bugmes();quit;end 56if (axes.box <> "on") then bugmes();quit;end; 57if (axes.x_location <> "middle") then bugmes();quit;end 58if (axes.y_location <> "middle") then bugmes();quit;end 59// axesflag=9: axes + !box + y left 60clf(); 61plot2d(x, x, axesflag=9); 62axes = gca(); 63if (axes.axes_visible <> ["on","on","on"]) then bugmes();quit;end 64if (axes.box <> "off") then bugmes();quit;end; 65if (axes.y_location <> "left") then bugmes();quit;end 66