本文整理汇总了Python中Stoner.Data.figwidth方法的典型用法代码示例。如果您正苦于以下问题:Python Data.figwidth方法的具体用法?Python Data.figwidth怎么用?Python Data.figwidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stoner.Data
的用法示例。
在下文中一共展示了Data.figwidth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Data
# 需要导入模块: from Stoner import Data [as 别名]
# 或者: from Stoner.Data import figwidth [as 别名]
d = Data(filename, setas="xyy", template=DefaultPlotStyle)
d.normalise(2, scale=(0.0, 10.0)) # Just to keep the plot sane!
# Change the color and line style cycles
d.template["axes.prop_cycle"] = cycler(color=["Blue", "Purple"]) + cycler(
linestyle=["-", "--"]
)
# Can also access as an attribute
d.template.template_lines__linewidth = 2.0
# Set the default figure size
d.template["figure.figsize"] = (6, 8)
d.template["figure.autolayout"] = True
# Make figure (before using subplot method) and select first subplot
d.figure()
d.subplot(211)
# Pkot with our customised defaults
d.plot()
d.grid(True, color="green", linestyle="-.")
d.title = "Customised Plot settings"
# Reset the template to defaults and switch to next subplot
d.template.clear()
d.subplot(212)
# Plot with defaults
d.plot()
d.title = "Style Default settings"
# Fixup layout
d.figwidth = 7 # Magic pass through attribute access