X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test%2FVisuPrs%2F2D_viewer%2FA1.py;h=fcf0751ab32da65203e063bd517979541e8ee304;hb=3141da4eeb56e3ce9c3ab9127019cabac7dae303;hp=17fc4c806872b712e5ef3291f58c689a633ce703;hpb=89c33033151baa33eeac8fb09d9c0488acb43c35;p=modules%2Fparavis.git diff --git a/test/VisuPrs/2D_viewer/A1.py b/test/VisuPrs/2D_viewer/A1.py index 17fc4c80..fcf0751a 100755 --- a/test/VisuPrs/2D_viewer/A1.py +++ b/test/VisuPrs/2D_viewer/A1.py @@ -1,9 +1,9 @@ -# Copyright (C) 2010-2012 CEA/DEN, EDF R&D +# Copyright (C) 2010-2015 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either -# version 2.1 of the License. +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -19,36 +19,48 @@ # This case corresponds to: /visu/2D_viewer/A1 case -from paravistest import test_values -from pvsimple import CreateXYPlotView +from paravistest import * +from presentations import * +from pvsimple import * # Create view aXYPlot = CreateXYPlotView() +Render(aXYPlot) + +error = 0 + +# Apply custom axes range +Etvalue = (1, 1, 1, 1) +aXYPlot.LeftAxisUseCustomRange, aXYPlot.BottomAxisUseCustomRange, aXYPlot.RightAxisUseCustomRange, aXYPlot.TopAxisUseCustomRange = 1, 1, 1, 1 +Ranges = aXYPlot.LeftAxisUseCustomRange, aXYPlot.BottomAxisUseCustomRange, aXYPlot.RightAxisUseCustomRange, aXYPlot.TopAxisUseCustomRange +error = error + test_values(Ranges, Etvalue) + +# Set custom axes range +aXYPlot.LeftAxisUseCustomRange = 1 +aXYPlot.BottomAxisUseCustomRange = 1 -# Set range -axisRange = aXYPlot.AxisRange # Left axis range -axisRange[0:2] = [200., 800.] -Ranges = aXYPlot.AxisRange -Etvalue = [200, 800, axisRange[2], axisRange[3], - axisRange[4], axisRange[5], axisRange[6], axisRange[7] ] -error = test_values(Ranges, Etvalue) +Etvalue = (200., 800.) +aXYPlot.LeftAxisRangeMinimum, aXYPlot.LeftAxisRangeMaximum = Etvalue +Ranges = aXYPlot.LeftAxisRangeMinimum, aXYPlot.LeftAxisRangeMaximum +error = error + test_values(Ranges, Etvalue) + # Bottom axis range -aXYPlot.AxisRange[2:4] = [350.,750.] -Ranges = aXYPlot.AxisRange -Etvalue = [200, 800, 350, 750, - axisRange[4], axisRange[5], axisRange[6], axisRange[7]] +Etvalue = (350., 750.) +aXYPlot.BottomAxisRangeMinimum, aXYPlot.BottomAxisRangeMaximum = Etvalue +Ranges = aXYPlot.BottomAxisRangeMinimum, aXYPlot.BottomAxisRangeMaximum error = error + test_values(Ranges, Etvalue) -# Left and bottom axis range -aXYPlot.AxisRange[0:4] = [1350.,2750.,240.,2230.] -Ranges=aXYPlot.AxisRange -Etvalue=[1350.,2750.,240.,2230., - axisRange[4], axisRange[5], axisRange[6], axisRange[7]] + +# Right axis range +Etvalue = (0., 300.) +aXYPlot.RightAxisRangeMinimum, aXYPlot.RightAxisRangeMaximum = Etvalue +Ranges = aXYPlot.RightAxisRangeMinimum, aXYPlot.RightAxisRangeMaximum error = error + test_values(Ranges, Etvalue) -# Left, bottom, right and top axis range -aXYPlot.AxisRange = [0, 200, 100, 450, 0, 200, 100, 450] -Ranges = aXYPlot.AxisRange -Etvalue = [0, 200, 100, 450, 0, 200, 100, 450] + +# Top axis range +Etvalue = (100., 450.) +aXYPlot.TopAxisRangeMinimum, aXYPlot.TopAxisRangeMaximum = Etvalue +Ranges = aXYPlot.TopAxisRangeMinimum, aXYPlot.TopAxisRangeMaximum error = error + test_values(Ranges, Etvalue) if error > 0: