Back to index

salome-paravis  6.5.0
A1.py
Go to the documentation of this file.
00001 # Copyright (C) 2010-2012  CEA/DEN, EDF R&D
00002 #
00003 # This library is free software; you can redistribute it and/or
00004 # modify it under the terms of the GNU Lesser General Public
00005 # License as published by the Free Software Foundation; either
00006 # version 2.1 of the License.
00007 #
00008 # This library is distributed in the hope that it will be useful,
00009 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 # Lesser General Public License for more details.
00012 #
00013 # You should have received a copy of the GNU Lesser General Public
00014 # License along with this library; if not, write to the Free Software
00015 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 #
00017 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 #
00019 
00020 # This case corresponds to: /visu/2D_viewer/A1 case
00021 
00022 from paravistest import test_values
00023 from pvsimple import CreateXYPlotView
00024 
00025 # Create view
00026 aXYPlot = CreateXYPlotView()
00027 
00028 # Set range
00029 axisRange = aXYPlot.AxisRange
00030 # Left axis range
00031 axisRange[0:2] = [200., 800.]
00032 Ranges = aXYPlot.AxisRange
00033 Etvalue = [200, 800, axisRange[2], axisRange[3],
00034            axisRange[4], axisRange[5], axisRange[6], axisRange[7] ]
00035 error = test_values(Ranges, Etvalue)
00036 # Bottom axis range
00037 aXYPlot.AxisRange[2:4] = [350.,750.]
00038 Ranges = aXYPlot.AxisRange
00039 Etvalue = [200, 800, 350, 750,
00040            axisRange[4], axisRange[5], axisRange[6], axisRange[7]]
00041 error = error + test_values(Ranges, Etvalue)
00042 # Left and bottom axis range
00043 aXYPlot.AxisRange[0:4] = [1350.,2750.,240.,2230.]
00044 Ranges=aXYPlot.AxisRange
00045 Etvalue=[1350.,2750.,240.,2230.,
00046          axisRange[4], axisRange[5], axisRange[6], axisRange[7]]
00047 error = error + test_values(Ranges, Etvalue)
00048 # Left, bottom, right and top axis range
00049 aXYPlot.AxisRange = [0, 200, 100, 450, 0, 200, 100, 450]
00050 Ranges = aXYPlot.AxisRange
00051 Etvalue = [0, 200, 100, 450, 0, 200, 100, 450]
00052 error = error + test_values(Ranges, Etvalue)
00053 
00054 if error > 0:
00055     raise RuntimeError, "There is(are) some error(s) was(were) found... For more info see ERRORs above..."