本文整理匯總了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)
示例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")
示例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"