X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test%2FVisuPrs%2F2D_viewer%2FA0.py;h=aad739bac60fcd30a49d07dc072e4d1f53dd300b;hb=467172fc03f8d730254bf304355fb76663bb33d0;hp=adeebd65315ae64464e0b2e2a9b8cc68d0862b1f;hpb=c7c9039d845fb2a5e2eb391139af089b4bed26a5;p=modules%2Fparavis.git diff --git a/test/VisuPrs/2D_viewer/A0.py b/test/VisuPrs/2D_viewer/A0.py index adeebd65..aad739ba 100755 --- a/test/VisuPrs/2D_viewer/A0.py +++ b/test/VisuPrs/2D_viewer/A0.py @@ -1,9 +1,9 @@ -# Copyright (C) 2010-2013 CEA/DEN, EDF R&D +# Copyright (C) 2010-2016 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,64 +19,55 @@ # This case corresponds to: /visu/2D_viewer/A0 case -import paravistest - -from pvsimple import CreateXYPlotView, Delete +from paravistest import * +from presentations import * +from pvsimple import * # Create view aXYPlot = CreateXYPlotView() -# Delete view -Delete(aXYPlot) -# Create view again -aXYPlot = CreateXYPlotView() +Render(aXYPlot) # Set title -print "Default chart title ...", aXYPlot.ChartTitle -aXYPlot.ChartTitle = ' ' +print "Default chart title ...", aXYPlot.ChartTitle aXYPlot.ChartTitle = 'title of XY plot' -print "Chart title for xyplot ...", aXYPlot.ChartTitle +print "New chart title ...", aXYPlot.ChartTitle -error = 0 -try: - aXYPlot.ShowAxis = [1, 1, 0, 0] -except: - print "Error: ShowAxis property is not avaliable for XYPlotView" - error = error + 1 - -aXYPlot.AxisUseCustomRange = [1, 1, 0, 0] +# Apply custom axes range +aXYPlot.LeftAxisUseCustomRange = 1 +aXYPlot.BottomAxisUseCustomRange = 1 # Show grids -aXYPlot.ShowAxisGrid = [1, 1, 0, 0] +aXYPlot.ShowLeftAxisGrid = 1 +aXYPlot.ShowBottomAxisGrid = 1 aMinX = 0 aMaxX = 100 aMinY = 0 aMaxY = 10 -aXYPlot.BottomAxisRange = [aMinX, aMaxX] -aXYPlot.LeftAxisRange = [aMinY, aMaxY] +aXYPlot.LeftAxisRangeMinimum = aMinY +aXYPlot.LeftAxisRangeMaximum = aMaxY +aXYPlot.BottomAxisRangeMinimum = aMinX +aXYPlot.BottomAxisRangeMaximum = aMaxX # Set horizontal scaling for left and bottom axis -print "Default logarithmic scaling ...", aXYPlot.AxisLogScale +print "Default logarithmic scaling ... left = %s, bottom = %s" % ( aXYPlot.LeftAxisLogScale, aXYPlot.BottomAxisLogScale ) # Set logarithmic scaling -aXYPlot.AxisLogScale = [1, 1, 0, 0] -print "Logarithmic scaling ...", aXYPlot.AxisLogScale +aXYPlot.LeftAxisLogScale = 1 +aXYPlot.BottomAxisLogScale = 1 +print "Set logarithmic scaling ... left = %s, bottom = %s" % ( aXYPlot.LeftAxisLogScale, aXYPlot.BottomAxisLogScale ) # Set linear scaling -aXYPlot.AxisLogScale = [0, 0, 0, 0] -print "Linear scaling ...", aXYPlot.AxisLogScale +aXYPlot.LeftAxisLogScale = 0 +aXYPlot.BottomAxisLogScale = 0 +print "Set linear scaling ... left = %s, bottom = %s" % ( aXYPlot.LeftAxisLogScale, aXYPlot.BottomAxisLogScale ) # Axis titles -print "Default title of the left axis ...", aXYPlot.AxisTitle[0] -aXYPlot.AxisTitle[0] = ' ' -aXYPlot.AxisTitle[0] ="Xtitle of XY plot" -print "Title of the left axis ...", aXYPlot.AxisTitle[0] -print "Default title of the bottom axis ...", aXYPlot.AxisTitle[1] -aXYPlot.AxisTitle[1] = ' ' -aXYPlot.AxisTitle[1] = "Ytitle of XY plot" -print "Title of the bottom axis ...", aXYPlot.AxisTitle[1] +print "Default title of the left axis ...", aXYPlot.LeftAxisTitle +aXYPlot.LeftAxisTitle = "Ytitle of XY plot" +print "New title of the left axis ...", aXYPlot.LeftAxisTitle +print "Default title of the bottom axis ...", aXYPlot.BottomAxisTitle +aXYPlot.BottomAxisTitle = "Xtitle of XY plot" +print "New title of the bottom axis ...", aXYPlot.BottomAxisTitle # Show/hide legend aXYPlot.ShowLegend = 1 aXYPlot.ShowLegend = 0 - -if error > 0: - raise RuntimeError, "There is(are) some error(s) was(were) found... For more info see ERRORs above..."