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


Python Plot.setTwinX方法代码示例

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


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

示例1: constructImage

# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import setTwinX [as 别名]
    def constructImage(self):
        line1 = Line()
        line1.xValues = range(7)
        line1.yValues = [1, 2, 4, 8, 16, 32, 64]
        line1.label = "First Plot"
        line1.lineStyle = "-"
        line1.color = "red"

        line2 = Line()
        line2.xValues = range(7)
        line2.yValues = [100, 90, 80, 70, 60, 50, 40]
        line2.label = "Second Plot"
        line2.lineStyle = "--"
        line2.color = "blue"

        plot = Plot()
        plot.add(line1)
        plot.add(line2)
        plot.xLabel = "Shared X Axis"
        plot.yLabel = "First Plot's Y Axis"
        plot.setTwinX("Second Plot's Y Axis", 1)
        plot.hasLegend()

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

示例2: Line

# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import setTwinX [as 别名]
#!/usr/bin/env python

from boomslang import Line, Plot

line1 = Line()
line1.xValues = range(7)
line1.yValues = [1, 2, 4, 8, 16, 32, 64]
line1.label = "First Plot"
line1.lineStyle = "-"
line1.color = "red"

line2 = Line()
line2.xValues = range(7)
line2.yValues = [100, 90, 80, 70, 60, 50, 40]
line2.label = "Second Plot"
line2.lineStyle = "--"
line2.color = "blue"

plot = Plot()
plot.add(line1)
plot.add(line2)
plot.setXLabel("Shared X Axis")
plot.setYLabel("First Plot's Y Axis")
plot.setTwinX("Second Plot's Y Axis", 1)
plot.hasLegend()

plot.save("twinx.png")
开发者ID:crazyideas21,项目名称:dev,代码行数:29,代码来源:twinx.py

示例3: Scatter

# 需要导入模块: from boomslang import Plot [as 别名]
# 或者: from boomslang.Plot import setTwinX [as 别名]
scatter2.color = "green"

scatter3 = Scatter()
scatter3.xValues = x
scatter3.yValues = surf
scatter3.label = "Original Surface"
scatter3.markerSize = 1
scatter3.color = "blue"

scatterPlot = Plot()
scatterPlot.add(scatter1)
scatterPlot.add(scatter2)

scatterPlot.xLabel = "Distance Along Cross Section"
scatterPlot.yLabel = "Surface Height"
scatterPlot.setTwinX("1st Derivative", 1)
scatterPlot.title = "Surface (filtered)"
scatterPlot.hasLegend()

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

# plot the filtered surface with the original surface
scatter1 = Scatter()
scatter1.xValues = x
scatter1.yValues = surfFiltered
scatter1.markerSize = 1
scatter1.label = "Filtered Surface"
scatter1.color = "black"
开发者ID:rayjanwilson,项目名称:roadmapper,代码行数:33,代码来源:scratch.py


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