本文整理匯總了Python中enthought.chaco.api.HPlotContainer.padding_top方法的典型用法代碼示例。如果您正苦於以下問題:Python HPlotContainer.padding_top方法的具體用法?Python HPlotContainer.padding_top怎麽用?Python HPlotContainer.padding_top使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類enthought.chaco.api.HPlotContainer
的用法示例。
在下文中一共展示了HPlotContainer.padding_top方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _create_plot_component
# 需要導入模塊: from enthought.chaco.api import HPlotContainer [as 別名]
# 或者: from enthought.chaco.api.HPlotContainer import padding_top [as 別名]
def _create_plot_component():
numpoints = 100
low = -5
high = 15.0
x = arange(low, high, (high - low) / numpoints)
container = HPlotContainer(resizable="hv", bgcolor="lightgray", fill_padding=True, padding=10)
# container = VPlotContainer(resizable = "hv", bgcolor="lightgray",
# fill_padding=True, padding = 10)
# Plot some bessel functions
value_range = None
for i in range(10):
y = jn(i, x)
plot = create_line_plot((x, y), color=tuple(COLOR_PALETTE[i]), width=2.0, orientation="v")
# orientation="h")
plot.origin_axis_visible = True
plot.origin = "top left"
plot.padding_left = 10
plot.padding_right = 10
plot.border_visible = True
plot.bgcolor = "white"
if value_range is None:
value_range = plot.value_mapper.range
else:
plot.value_range = value_range
value_range.add(plot.value)
if i % 2 == 1:
plot.line_style = "dash"
container.add(plot)
container.padding_top = 50
container.overlays.append(PlotLabel("More Bessels", component=container, font="swiss 16", overlay_position="top"))
return container