当前位置: 首页>>代码示例>>Python>>正文


Python Plot.xLimits方法代码示例

本文整理汇总了Python中boomslang.Plot.xLimits方法的典型用法代码示例。如果您正苦于以下问题:Python Plot.xLimits方法的具体用法?Python Plot.xLimits怎么用?Python Plot.xLimits使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在boomslang.Plot的用法示例。


在下文中一共展示了Plot.xLimits方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: constructImage

# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import xLimits [as 别名]
    def constructImage(self):
        plot = Plot()

        # Uneven error bars
        line = Line()
        line.xValues = [6,10,4,0,8,2,12]
        line.yValues = [50,90,30,10,70,20,110]
        line.yMins   = [y - 30 for y in line.yValues]
        line.yMaxes  = [y + 50 for y in line.yValues]
        line.label = "Asymmetric Errors"
        line.color = "red"

        # Even error bars
        line2 = Line()
        line2.xValues = [1,5,3,9,7,11]
        line2.yValues = [100, 120, 110, 140, 130, 150]
        line2.color = "blue"
        line2.label = "Symmetric Errors"
        line2.yErrors = [5,25,15,45,35,55]

        plot.add(line)
        plot.add(line2)
        plot.xLabel = "X Label"
        plot.yLabel = "Y Label"
        plot.hasLegend()
        plot.xLimits = (-1, 13)
        plot.save(self.imageName)
开发者ID:alexras,项目名称:boomslang,代码行数:29,代码来源:test_errorbars.py

示例2: main

# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import xLimits [as 别名]
def main():

    output_graph = sys.argv[1]

    plot = Plot()
    plot.hasLegend(location='lower right')
    plot.xLabel = 'Per-client throughput (Mbps)'  # Change this
    plot.yLabel = 'CDF'
    plot.xLimits = (0, 50)
    plot.yLimits = (0, 1)
    plot.legendLabelSize = FONT_SIZE
    plot.xTickLabelSize = FONT_SIZE - 2
    plot.yTickLabelSize = FONT_SIZE - 2
    plot.axesLabelSize = FONT_SIZE
    
    for csv_file in sys.argv[2:]:
        
        cdf_table = _make_cdf(csv_file)
        
        line = Line()
        line.xValues = [x for (x, _) in cdf_table]
        line.yValues = [y for (_, y) in cdf_table]
        line.color = colors.pop(0)
        line.lineStyle = line_styles.pop(0)
        
        # Extract the filename
        line.label = capitalize( csv_file.split('/')[-2].replace('.csv', '') )
        plot.add(line)
        
    plot.save(output_graph)
开发者ID:crazyideas21,项目名称:swclone,代码行数:32,代码来源:plot_cdf.py

示例3: generatePlot

# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import xLimits [as 别名]
        def generatePlot(stepType):
            line = Line()
            line.xValues = xVals
            line.yValues = yVals
            line.marker = 'o'
            line.stepFunction(stepType)

            plot = Plot()
            plot.add(line)
            plot.title = r'"%s" Steps' % (stepType)
            plot.xLimits = (0, 6)
            plot.yLimits = (0, 6)

            return plot
开发者ID:alexras,项目名称:boomslang,代码行数:16,代码来源:test_steps.py

示例4: constructImage

# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import xLimits [as 别名]
    def constructImage(self):
        line = Line()
        line.xValues = numpy.arange(0, 150, 0.01)
        line.yValues = numpy.cos(.02 * numpy.pi * line.xValues)

        plot = Plot()
        plot.add(line)
        plot.xLimits = (0, 150)
        plot.yLimits = (-1, 1)
        plot.xLabel = "X"
        plot.yLabel = "cos(X)"
        splitPlots = plot.split(2)

        layout = PlotLayout()
        layout.width = 2
        layout.addPlot(plot, grouping="unsplit")

        for s in splitPlots:
            layout.addPlot(s, grouping="splits")

        layout.save(self.imageName)
开发者ID:alexras,项目名称:boomslang,代码行数:23,代码来源:test_split.py

示例5: constructImage

# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import xLimits [as 别名]
    def constructImage(self):
        line1 = Line()
        line2 = Line()
        line3 = Line()

        line1.xValues = range(0,10)
        line1.yValues = [2,5,2,3,2,2,1,0,1,0]
        line2.xValues = range(0,10)
        line2.yValues = [3,1,2,3,2,1,5,3,1,7]
        line3.xValues = range(0,10)
        line3.yValues = [2,1,3,1,3,4,1,4,5,0]

        stack = StackedLines()
        stack.addLine(line1, "red")
        stack.addLine(line2, "green")
        stack.addLine(line3, "blue")

        plot = Plot()
        plot.xLimits = (0, 9)
        plot.yLimits = (0, 7)
        plot.add(stack)
        plot.save(self.imageName)
开发者ID:alexras,项目名称:boomslang,代码行数:24,代码来源:test_stackedlines.py

示例6: PlotLayout

# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import xLimits [as 别名]
scatterPlot.yLabel = "dHeight/dX"
scatterPlot.title = "Surface - Gradient"

layout = PlotLayout()
layout.addPlot(scatterPlot)
#layout.plot()
layout.save("profile1_gradient.png")

#now plot the fft of the surface
line = Line()
line.xValues = freqs
line.yValues = abs(FFT)

linePlot = Plot()
linePlot.add(line)
linePlot.xLimits = (0, .5)
linePlot.xLabel = "Freqs [Hz]"
linePlot.yLabel = "Amplitude"
linePlot.title = "Surface - FFT (zoomed)"

layout = PlotLayout()
layout.addPlot(linePlot)
#layout.plot()
layout.save("profile1_fft.png")
#pylab.subplot(212)
#pylab.plot(freqs,20*scipy.log10(FFT),'x')
#pylab.show()

# plot the filtered surface with the gradient
scatter1 = Scatter()
scatter1.xValues = x
开发者ID:rayjanwilson,项目名称:roadmapper,代码行数:33,代码来源:scratch.py


注:本文中的boomslang.Plot.xLimits方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。