當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。