http://bokeh.pydata.org/en/latest/docs/reference/plotting.html
figure(**kwargs)
返回一个画板对象(Figure)
参数 | 类型 | 描述 |
---|---|---|
active_drag | Either ( Auto , String , Instance ( Drag ) ) | 默认激活某个drag工具 |
active_inspect | Either ( Auto , String , Instance ( Inspection ), Seq ( Instance ( Inspection ) ) ) | 默认激活inspect工具 |
active_scroll | Either ( Auto , String , Instance ( Scroll ) ) | 默认激活scroll工具 |
active_tap | Either ( Auto , String , Instance ( Tap ) ) | 默认激活某个tap工具 |
tools | Either ( String , Seq ( Either ( String , Instance ( Tool ) ) ) ) | 选择工具 |
(y)x_axis_label | String | Y,X轴标签 |
(y)x_axis_location | Enum ( VerticalLocation ) | Y,X轴位置 |
(y)x_axis_type | Either ( Auto , Enum ( Enumeration(linear, log, datetime) ) ) | Y,X轴数据类型 |
(y)x_minor_ticks | Either ( Auto , Int ) | Number of minor ticks between adjacent x-axis major ticks. |
(y)x_range | Either ( Tuple ( Float , Float ), Seq ( String ), Instance ( Range ) ) | Y,X轴坐标范围 |
class Figure(*arg, **kw)
属性可以由figure方法设置,也可以由对象设置
一下方法全部返回一个GlyphRenderer对象
继承了class Plot(**kwargs)
1. annular_wedge(x, y, inner_radius, outer_radius, start_angle, end_angle, direction=’anticlock’, **kwargs)
2. annulus(x, y, inner_radius, outer_radius, **kwargs)
3. arc(x, y, radius, start_angle, end_angle, direction=’anticlock’, **kwargs)
4. asterisk(x, y, size=4, angle=0.0, **kwargs)
5. bezier(x0, y0, x1, y1, cx0, cy0, cx1, cy1, **kwargs)
6. circle(x, y, **kwargs)
7. circle_cross(x, y, size=4, angle=0.0, **kwargs)
8. circle_x(x, y, size=4, angle=0.0, **kwargs)
9. cross(x, y, size=4, angle=0.0, **kwargs)
10. diamond(x, y, size=4, angle=0.0, **kwargs)
11. diamond_cross(x, y, size=4, angle=0.0, **kwargs)
12. ellipse(x, y, width, height, angle=0.0, **kwargs)
13. hbar(y, height, right, left=0, **kwargs)
14. image(image, x, y, dw, dh, dilate=False, **kwargs)
15. image_rgba(image, x, y, dw, dh, dilate=False, **kwargs)
16. image_url(url, x, y, w, h, angle=0, global_alpha=1.0, dilate=False, **kwargs)
17. inverted_triangle(x, y, size=4, angle=0.0, **kwargs)
18. line(x, y, **kwargs)
19. multi_line(xs, ys, **kwargs)
20. oval(x, y, width, height, angle=0.0, **kwargs)
21. patch(x, y, **kwargs)
22. patches(xs, ys, **kwargs)
23. quad(left, right, top, bottom, **kwargs)
24. quadratic(x0, y0, x1, y1, cx, cy, **kwargs)
25. ray(x, y, length, angle, **kwargs)
26. rect(x, y, width, height, angle=0.0, dilate=False, **kwargs)
27. scatter(*args, **kwargs)
28. segment(x0, y0, x1, y1, **kwargs)
29. square(x, y, size=4, angle=0.0, **kwargs)
30. square_cross(x, y, size=4, angle=0.0, **kwargs)
31. square_x(x, y, size=4, angle=0.0, **kwargs)
32. text(x, y, text=’text’, angle=0, x_offset=0, y_offset=0, **kwargs)
33. triangle(x, y, size=4, angle=0.0, **kwargs)
34. vbar(x, width, top, bottom=0, **kwargs)
35. wedge(x, y, radius, start_angle, end_angle, direction=’anticlock’, **kwargs)
36. x(x, y, size=4, angle=0.0, **kwargs)
class Plot(**kwargs)
参数 | 类型 | 描述 |
---|---|---|
above | List ( Instance ( Renderer ) ) | A list of renderers to occupy the area above of the plot. |
background_fill_alpha | NumberSpec | The fill alpha for the plot background style. |
background_fill_color | ColorSpec | The fill color for the plot background style. |
below | List ( Instance ( Renderer ) ) | A list of renderers to occupy the area below of the plot. |
border_fill_alpha | NumberSpec | The fill alpha for the plot border style. |
border_fill_color | ColorSpec | The fill color for the plot border style. |
extra_(y)x_ranges | Dict ( String , Instance ( Range ) ) | Additional named ranges to make available for mapping x-coordinates. |
h_symmetry | Bool | Whether the total horizontal padding on both sides of the plot will be made equal |
hidpi | Bool | Whether to use HiDPI mode when available |
inner_height | Int | This is the exact height of the plotting canvas, i.e. the height of the actual plot, without toolbars etc. |
inner_width | Int | This is the exact width of the plotting canvas, i.e. the width of the actual plot, without toolbars etc. |
layout_height | Int | This is the exact height of the layout, i.e. the height of the actual plot, with toolbars etc. |
layout_width | Int | This is the exact width of the layout, i.e. the height of the actual plot, with toolbars etc. |
left | List ( Instance ( Renderer ) ) | A list of renderers to occupy the area to the left of the plot. |
lod_factor | Int | Decimation factor to use when applying level-of-detail decimation. |
lod_interval | Int | Interval (in ms) during which an interactive tool event will enable level-of-detail downsampling. |
lod_threshold | Int | A number of data points, above which level-of-detail downsampling may be performed by glyph renderers. |
lod_timeout | Int | Timeout (in ms) for checking whether interactive tool events are still occurring. |
min_border | Int | A convenience property to set all all the min_border_X properties to the same value. |
min_border_bottom | Int | Minimum size in pixels of the padding region below the bottom of the central plot region. |
min_border_left | Int | Minimum size in pixels of the padding region to the left of the central plot region. |
min_border_right | Int | Minimum size in pixels of the padding region to the right of the central plot region. |
min_border_top | Int | Minimum size in pixels of the padding region above the top of the central plot region. |
outline_line_alpha | NumberSpec | The line alpha for the plot border outline. |
outline_line_cap | Enum ( LineCap ) | The line cap for the plot border outline. |
outline_line_color | ColorSpec | The line color for the plot border outline. |
outline_line_dash | DashPattern | |
outline_line_dash_offset | Int | |
outline_line_join | Enum ( LineJoin ) | |
outline_line_width | NumberSpec | |
output_backend | Enum ( OutputBackend ) | |
plot_height | Int | |
plot_width | Int | |
renderers | List ( Instance ( Renderer ) ) | |
right | List ( Instance ( Renderer ) ) | |
title | Instance ( Title ) | |
title_location | Enum ( Location ) | |
tool_events | Instance ( ToolEvents ) | |
toolbar | Instance ( Toolbar ) | |
toolbar_location | Enum ( Location ) | |
toolbar_sticky | Bool | |
v_symmetry | Bool | |
(y)x_range | Instance ( Range ) | |
(y)x_scale | Instance ( Scale ) | |
add_dynamic_image(image_source, **kw) | ||
add_glyph(source_or_glyph, glyph=None, **kw) | ||
add_layout(obj, place=’center’) | ||
add_tile(tile_source, **kw) | ||
add_tools(*tools) | ||
column(col, gridplot) | ||
row(row, gridplot)[source] | ||
select(*args, **kwargs) |