1 # Copyright (C) 2010-2012 CEA/DEN, EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # This case corresponds to: /visu/2D_viewer/A0 case
24 from pvsimple import CreateXYPlotView, Delete
27 aXYPlot = CreateXYPlotView()
31 aXYPlot = CreateXYPlotView()
34 print "Default chart title ...", aXYPlot.ChartTitle
35 aXYPlot.ChartTitle = ' '
36 aXYPlot.ChartTitle = 'title of XY plot'
37 print "Chart title for xyplot ...", aXYPlot.ChartTitle
39 # Show left and bottom axis
40 aXYPlot.ShowAxis = [1, 1, 0, 0]
43 aXYPlot.ShowAxisGrid = [1, 1, 0, 0]
45 # Set axis range for left and bottom axis
46 aXYPlot.AxisBehavior = [1, 1, 0, 0]
52 aXYPlot.AxisRange = [aMinX, aMaxX, aMinY, aMaxY, 0.0, 1.0, 0.0, 1.0]
54 # Set horizontal scaling for left and bottom axis
55 print "Default logarithmic scaling ...", aXYPlot.AxisLogScale
56 # Set logarithmic scaling
57 aXYPlot.AxisLogScale = [1, 1, 0, 0]
58 print "Logarithmic scaling ...", aXYPlot.AxisLogScale
60 aXYPlot.AxisLogScale = [0, 0, 0, 0]
61 print "Linear scaling ...", aXYPlot.AxisLogScale
64 print "Default title of the left axis ...", aXYPlot.AxisTitle[0]
65 aXYPlot.AxisTitle[0] = ' '
66 aXYPlot.AxisTitle[0] ="Xtitle of XY plot"
67 print "Title of the left axis ...", aXYPlot.AxisTitle[0]
68 print "Default title of the bottom axis ...", aXYPlot.AxisTitle[1]
69 aXYPlot.AxisTitle[1] = ' '
70 aXYPlot.AxisTitle[1] = "Ytitle of XY plot"
71 print "Title of the bottom axis ...", aXYPlot.AxisTitle[1]
74 aXYPlot.ShowLegend = 1
75 aXYPlot.ShowLegend = 0