def xyExample1(netPlot, plotNumber): """two plots with different linear Y scales""" plotConfig0 = PlotConfig() plotConfig0.plotName="Plot 0" plotConfig0.xAxisName="The X axis name" plotConfig0.yAxisName="Y axis (Plot 0)" plotConfig0.enableLines=1 plotConfig0.enableShapes=1 plotConfig0.enableAutoScale=1 plotConfig0.enableZeroOnXAxis=0 plotConfig0.enableZeroOnYAxis=0 netPlot.setPlotType('xy', title="%d: XY chart, two traces with different linear Y scales, both autoscaled" % (plotNumber) ) netPlot.addPlot(plotConfig0) plotConfig1 = PlotConfig() plotConfig1.plotName="Plot 1" plotConfig1.yAxisName="Y axis (Plot 1)" plotConfig1.enableLines=1 plotConfig1.enableShapes=1 plotConfig1.enableAutoScale=1 plotConfig1.enableZeroOnXAxis=0 plotConfig1.enableZeroOnYAxis=0 netPlot.addPlot(plotConfig1) i=0 while i<10: netPlot.addXYPlotValues(0,random.randint(-90,-70), random.randint(130,150)) netPlot.addXYPlotValues(1,random.randint(-60,-50), random.randint(75,80)) i=i+1
def xyExample1(netPlot, plotNumber): """two plots with different linear Y scales""" plotConfig0 = PlotConfig() plotConfig0.plotName = "Plot 0" plotConfig0.xAxisName = "The X axis name" plotConfig0.yAxisName = "Y axis (Plot 0)" plotConfig0.enableLines = 1 plotConfig0.enableShapes = 1 plotConfig0.enableAutoScale = 1 plotConfig0.enableZeroOnXAxis = 0 plotConfig0.enableZeroOnYAxis = 0 netPlot.setPlotType( 'xy', title= "%d: XY chart, two traces with different linear Y scales, both autoscaled" % (plotNumber)) netPlot.addPlot(plotConfig0) plotConfig1 = PlotConfig() plotConfig1.plotName = "Plot 1" plotConfig1.yAxisName = "Y axis (Plot 1)" plotConfig1.enableLines = 1 plotConfig1.enableShapes = 1 plotConfig1.enableAutoScale = 1 plotConfig1.enableZeroOnXAxis = 0 plotConfig1.enableZeroOnYAxis = 0 netPlot.addPlot(plotConfig1) i = 0 while i < 10: netPlot.addXYPlotValues(0, random.randint(-90, -70), random.randint(130, 150)) netPlot.addXYPlotValues(1, random.randint(-60, -50), random.randint(75, 80)) i = i + 1
def xyExample3(netPlot, plotNumber): """XY chart with 2 lin and 2 log Y scales""" plotConfig0 = PlotConfig() plotConfig0.plotName="Plot 0" plotConfig0.xAxisName="The X axis name" plotConfig0.yAxisName="Log Y axis (Plot 0)" plotConfig0.enableLines=1 plotConfig0.enableShapes=1 plotConfig0.enableLogYAxis=1 plotConfig0.minScaleValue=1E-10 plotConfig0.maxScaleValue=1E-2 netPlot.setPlotType('xy', title="%d: XY chart with 2 lin and 2 log Y scales" % (plotNumber) ) netPlot.addPlot(plotConfig0) plotConfig1 = PlotConfig() plotConfig1.plotName="Plot 1" plotConfig1.yAxisName="Y axis (Plot 1)" plotConfig1.enableLines=1 plotConfig1.enableShapes=1 plotConfig1.enableAutoScale=1 plotConfig1.enableZeroOnXAxis=0 plotConfig1.enableZeroOnYAxis=0 netPlot.addPlot(plotConfig1) plotConfig2 = PlotConfig() plotConfig2.plotName="Plot 2" plotConfig2.yAxisName="Y axis (Plot 2)" plotConfig2.enableLines=1 plotConfig2.enableShapes=1 plotConfig2.enableAutoScale=1 plotConfig2.enableZeroOnXAxis=0 plotConfig2.enableZeroOnYAxis=0 netPlot.addPlot(plotConfig2) plotConfig3 = PlotConfig() plotConfig3.plotName="Plot 3" plotConfig3.yAxisName="Log Y axis (Plot 3)" plotConfig3.enableLines=1 plotConfig3.enableShapes=1 plotConfig3.enableLogYAxis=1 plotConfig3.minScaleValue=1E-10 plotConfig3.maxScaleValue=1E-2 netPlot.addPlot(plotConfig3) netPlot.addXYPlotValues(0,-50, 1E-9) netPlot.addXYPlotValues(0,-55, 1E-7) netPlot.addXYPlotValues(0,-60, 1E-6) netPlot.addXYPlotValues(0,-70, 1E-5) netPlot.addXYPlotValues(0,-80, 1E-4) netPlot.addXYPlotValues(0,-90, 1E-3) netPlot.addXYPlotValues(1,-10, 10) netPlot.addXYPlotValues(1,-9, 12) netPlot.addXYPlotValues(1,-8, 14) netPlot.addXYPlotValues(1,-7, 16) netPlot.addXYPlotValues(1,-6, 18) netPlot.addXYPlotValues(1,-5, 20) netPlot.addXYPlotValues(2,-35, 10) netPlot.addXYPlotValues(2,-95, 12) netPlot.addXYPlotValues(2,-85, 14) netPlot.addXYPlotValues(2,-75, 16) netPlot.addXYPlotValues(2,-65, 18) netPlot.addXYPlotValues(2,-55, 20) netPlot.addXYPlotValues(3,1, 1E-9) netPlot.addXYPlotValues(3,2, 1E-7) netPlot.addXYPlotValues(3,3, 1E-6) netPlot.addXYPlotValues(3,4, 1E-5) netPlot.addXYPlotValues(3,5, 1E-4) netPlot.addXYPlotValues(3,6, 1E-3)
def xyExample3(netPlot, plotNumber): """XY chart with 2 lin and 2 log Y scales""" plotConfig0 = PlotConfig() plotConfig0.plotName = "Plot 0" plotConfig0.xAxisName = "The X axis name" plotConfig0.yAxisName = "Log Y axis (Plot 0)" plotConfig0.enableLines = 1 plotConfig0.enableShapes = 1 plotConfig0.enableLogYAxis = 1 plotConfig0.minScaleValue = 1E-10 plotConfig0.maxScaleValue = 1E-2 netPlot.setPlotType('xy', title="%d: XY chart with 2 lin and 2 log Y scales" % (plotNumber)) netPlot.addPlot(plotConfig0) plotConfig1 = PlotConfig() plotConfig1.plotName = "Plot 1" plotConfig1.yAxisName = "Y axis (Plot 1)" plotConfig1.enableLines = 1 plotConfig1.enableShapes = 1 plotConfig1.enableAutoScale = 1 plotConfig1.enableZeroOnXAxis = 0 plotConfig1.enableZeroOnYAxis = 0 netPlot.addPlot(plotConfig1) plotConfig2 = PlotConfig() plotConfig2.plotName = "Plot 2" plotConfig2.yAxisName = "Y axis (Plot 2)" plotConfig2.enableLines = 1 plotConfig2.enableShapes = 1 plotConfig2.enableAutoScale = 1 plotConfig2.enableZeroOnXAxis = 0 plotConfig2.enableZeroOnYAxis = 0 netPlot.addPlot(plotConfig2) plotConfig3 = PlotConfig() plotConfig3.plotName = "Plot 3" plotConfig3.yAxisName = "Log Y axis (Plot 3)" plotConfig3.enableLines = 1 plotConfig3.enableShapes = 1 plotConfig3.enableLogYAxis = 1 plotConfig3.minScaleValue = 1E-10 plotConfig3.maxScaleValue = 1E-2 netPlot.addPlot(plotConfig3) netPlot.addXYPlotValues(0, -50, 1E-9) netPlot.addXYPlotValues(0, -55, 1E-7) netPlot.addXYPlotValues(0, -60, 1E-6) netPlot.addXYPlotValues(0, -70, 1E-5) netPlot.addXYPlotValues(0, -80, 1E-4) netPlot.addXYPlotValues(0, -90, 1E-3) netPlot.addXYPlotValues(1, -10, 10) netPlot.addXYPlotValues(1, -9, 12) netPlot.addXYPlotValues(1, -8, 14) netPlot.addXYPlotValues(1, -7, 16) netPlot.addXYPlotValues(1, -6, 18) netPlot.addXYPlotValues(1, -5, 20) netPlot.addXYPlotValues(2, -35, 10) netPlot.addXYPlotValues(2, -95, 12) netPlot.addXYPlotValues(2, -85, 14) netPlot.addXYPlotValues(2, -75, 16) netPlot.addXYPlotValues(2, -65, 18) netPlot.addXYPlotValues(2, -55, 20) netPlot.addXYPlotValues(3, 1, 1E-9) netPlot.addXYPlotValues(3, 2, 1E-7) netPlot.addXYPlotValues(3, 3, 1E-6) netPlot.addXYPlotValues(3, 4, 1E-5) netPlot.addXYPlotValues(3, 5, 1E-4) netPlot.addXYPlotValues(3, 6, 1E-3)