本文整理匯總了TypeScript中@bokehjs/api/plotting.figure函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript figure函數的具體用法?TypeScript figure怎麽用?TypeScript figure使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了figure函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it("should allow fixed frame 200px x 200px in a layout with a title", async () => {
const fig0 = figure({frame_width: 200, frame_height: 200, title: "A title"})
fig0.circle([0, 5, 10], [0, 5, 10], {size: 10})
const fig1 = figure({frame_width: 200, frame_height: 200})
fig1.circle([0, 5, 10], [0, 5, 10], {size: 10})
const row = new Row({children: [fig0, fig1]})
await display(row, [600, 300])
})
示例2: figure
const fig = (location: Location | null, title?: string) => {
const p = figure({
width: 200, height: 200, tools: "pan,reset", title,
toolbar_location: location, title_location: location})
p.circle([0, 5, 10], [0, 5, 10], {size: 10})
return p
}