X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test%2FVisuPrs%2F2D_viewer%2FA1.py;h=fcf0751ab32da65203e063bd517979541e8ee304;hb=3141da4eeb56e3ce9c3ab9127019cabac7dae303;hp=9a4004a471f747926e53758a2b9bc8f9b02b1f8e;hpb=ce399c6cd0e723c46bbfd02ffccb9314769f73e9;p=modules%2Fparavis.git diff --git a/test/VisuPrs/2D_viewer/A1.py b/test/VisuPrs/2D_viewer/A1.py index 9a4004a4..fcf0751a 100755 --- a/test/VisuPrs/2D_viewer/A1.py +++ b/test/VisuPrs/2D_viewer/A1.py @@ -1,9 +1,9 @@ -# Copyright (C) 2010-2013 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,50 +19,49 @@ # 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 -aXYPlot.AxisUseCustomRange = [1, 1, 0, 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 + # Left axis range -axisRange = aXYPlot.LeftAxisRange -axisRange[0:2] = [200., 800.] -Ranges = aXYPlot.LeftAxisRange -Etvalue = [200, 800] +Etvalue = (200., 800.) +aXYPlot.LeftAxisRangeMinimum, aXYPlot.LeftAxisRangeMaximum = Etvalue +Ranges = aXYPlot.LeftAxisRangeMinimum, aXYPlot.LeftAxisRangeMaximum error = error + test_values(Ranges, Etvalue) + # Bottom axis range -axisRange = aXYPlot.BottomAxisRange -axisRange[0:2] = [350.,750.] -Ranges = aXYPlot.BottomAxisRange -Etvalue = [350, 750] +Etvalue = (350., 750.) +aXYPlot.BottomAxisRangeMinimum, aXYPlot.BottomAxisRangeMaximum = Etvalue +Ranges = aXYPlot.BottomAxisRangeMinimum, aXYPlot.BottomAxisRangeMaximum +error = error + test_values(Ranges, Etvalue) + +# Right axis range +Etvalue = (0., 300.) +aXYPlot.RightAxisRangeMinimum, aXYPlot.RightAxisRangeMaximum = Etvalue +Ranges = aXYPlot.RightAxisRangeMinimum, aXYPlot.RightAxisRangeMaximum +error = error + test_values(Ranges, Etvalue) + +# Top axis range +Etvalue = (100., 450.) +aXYPlot.TopAxisRangeMinimum, aXYPlot.TopAxisRangeMaximum = Etvalue +Ranges = aXYPlot.TopAxisRangeMinimum, aXYPlot.TopAxisRangeMaximum error = error + test_values(Ranges, Etvalue) -# Left and bottom axis range -aXYPlot.LeftAxisRange[0:2] = [1350.,2750.] -aXYPlot.BottomAxisRange[0:2] = [240.,2230.] -Etvalue=[1350.,2750.,240.,2230.] -Ranges=aXYPlot.LeftAxisRange -error = error + test_values(Ranges, Etvalue[0:2]) -Ranges=aXYPlot.BottomAxisRange -error = error + test_values(Ranges, Etvalue[2:4]) -aXYPlot.AxisUseCustomRange = [1, 1, 1, 1] -# Left, bottom, right and top axis range -aXYPlot.LeftAxisRange = [0, 200] -aXYPlot.BottomAxisRange = [100, 450] -aXYPlot.RightAxisRange = [0, 200] -aXYPlot.TopAxisRange = [100, 450] -Etvalue = [0, 200, 100, 450, 0, 200, 100, 450] -Ranges=aXYPlot.LeftAxisRange -error = error + test_values(Ranges, Etvalue[0:2]) -Ranges=aXYPlot.BottomAxisRange -error = error + test_values(Ranges, Etvalue[2:4]) -Ranges=aXYPlot.RightAxisRange -error = error + test_values(Ranges, Etvalue[4:6]) -Ranges=aXYPlot.TopAxisRange -error = error + test_values(Ranges, Etvalue[6:8]) if error > 0: raise RuntimeError, "There is(are) some error(s) was(were) found... For more info see ERRORs above..."