本文整理汇总了Python中boomslang.Line.yTickLabelProperties["style"]方法的典型用法代码示例。如果您正苦于以下问题:Python Line.yTickLabelProperties["style"]方法的具体用法?Python Line.yTickLabelProperties["style"]怎么用?Python Line.yTickLabelProperties["style"]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boomslang.Line
的用法示例。
在下文中一共展示了Line.yTickLabelProperties["style"]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: constructImage
# 需要导入模块: from boomslang import Line [as 别名]
# 或者: from boomslang.Line import yTickLabelProperties["style"] [as 别名]
def constructImage(self):
plot = Plot()
line = Line()
line.yValues = [25, 40, 30, 23, 10, 50]
line.xValues = range(len(line.yValues))
line.xTickLabels = ["X 1", "X 2", "X 3", "X 4", "X 5"]
line.yTickLabels = ["Y Ten", "Y Twenty", "Y Thirty", "Y Forty",
"Y Fifty", "Y Sixty"]
line.yTickLabelPoints = [10, 20, 30, 40, 50, 60]
# You can set tick label properties with a dictionary ...
line.xTickLabelProperties = {
"color" : "blue",
"weight" : "bold",
"rotation" : 45
}
line.yTickLabelProperties = {
"style" : "italic",
"alpha" : 0.5,
"color" : "red"
}
# (clearing for demonstrative purposes)
line.xTickLabelProperties.clear()
line.yTickLabelProperties.clear()
# You can also set by direct elementwise access
line.xTickLabelProperties["color"] = "blue"
line.xTickLabelProperties["weight"] = "bold"
line.xTickLabelProperties["rotation"] = "45"
line.yTickLabelProperties["style"] = "italic"
line.yTickLabelProperties["alpha"] = 0.5
line.yTickLabelProperties["color"] = "red"
plot.add(line)
plot.setTitle("Craaazy Title")
plot.setTitleProperties(style="italic", weight="bold", rotation="5",
color="orange")
plot.setXLabel("X Label")
plot.setYLabel("Y Label")
plot.setYLimits(0, 60)
plot.setPlotParameters(bottom=.15, left=0.15)
plot.save(self.imageName)