holoviews.plotting package#
Subpackages#
- holoviews.plotting.bokeh package
- Submodules
- holoviews.plotting.bokeh.annotation module
- holoviews.plotting.bokeh.callbacks module
BoundsCallback
BoundsXCallback
BoundsYCallback
BoxEditCallback
CDSCallback
Callback
CurveEditCallback
DoubleTapCallback
DrawCallback
FreehandDrawCallback
GlyphDrawCallback
LassoCallback
MouseEnterCallback
MouseLeaveCallback
MultiAxisTapCallback
PanEndCallback
PlotSizeCallback
PointDrawCallback
PointerXCallback
PointerXYCallback
PointerYCallback
PolyDrawCallback
PolyEditCallback
PressUpCallback
RangeXCallback
RangeXYCallback
RangeYCallback
ResetCallback
SelectModeCallback
Selection1DCallback
SelectionXYCallback
SingleTapCallback
TapCallback
- holoviews.plotting.bokeh.chart module
- holoviews.plotting.bokeh.element module
- holoviews.plotting.bokeh.geometry module
- holoviews.plotting.bokeh.graphs module
- holoviews.plotting.bokeh.heatmap module
- holoviews.plotting.bokeh.hex_tiles module
- holoviews.plotting.bokeh.links module
- holoviews.plotting.bokeh.path module
- holoviews.plotting.bokeh.plot module
- holoviews.plotting.bokeh.raster module
- holoviews.plotting.bokeh.renderer module
- holoviews.plotting.bokeh.sankey module
- holoviews.plotting.bokeh.selection module
- holoviews.plotting.bokeh.stats module
- holoviews.plotting.bokeh.styles module
- holoviews.plotting.bokeh.tabular module
- holoviews.plotting.bokeh.tiles module
- holoviews.plotting.bokeh.util module
attach_periodic()
categorize_array()
cds_column_replace()
colormesh()
compute_layout_properties()
compute_plot_size()
convert_timestamp()
date_to_integer()
decode_bytes()
empty_plot()
filter_batched_data()
filter_toolboxes()
font_size_to_pixels()
get_default()
get_tab_title()
glyph_order()
hold_policy()
hold_render()
hsv_to_rgb()
layout_padding()
match_ax_type()
match_dim_specs()
match_yaxis_type_to_range()
merge_tools()
multi_polygons_data()
pad_plots()
pad_width()
periodic
prop_is_none()
property_to_dict()
recursive_model_update()
remove_legend()
select_legends()
silence_warnings()
sync_legends()
update_shared_sources()
wrap_formatter()
- Module contents
- Submodules
- holoviews.plotting.mpl package
- Submodules
- holoviews.plotting.mpl.annotation module
- holoviews.plotting.mpl.chart module
- holoviews.plotting.mpl.chart3d module
- holoviews.plotting.mpl.element module
- holoviews.plotting.mpl.geometry module
- holoviews.plotting.mpl.graphs module
- holoviews.plotting.mpl.heatmap module
- holoviews.plotting.mpl.hex_tiles module
- holoviews.plotting.mpl.path module
- holoviews.plotting.mpl.plot module
- holoviews.plotting.mpl.raster module
- holoviews.plotting.mpl.renderer module
- holoviews.plotting.mpl.sankey module
- holoviews.plotting.mpl.stats module
- holoviews.plotting.mpl.tabular module
- holoviews.plotting.mpl.util module
- Module contents
- Submodules
- holoviews.plotting.plotly package
- Submodules
- holoviews.plotting.plotly.annotation module
- holoviews.plotting.plotly.callbacks module
- holoviews.plotting.plotly.chart module
- holoviews.plotting.plotly.chart3d module
- holoviews.plotting.plotly.dash module
- holoviews.plotting.plotly.element module
- holoviews.plotting.plotly.images module
- holoviews.plotting.plotly.plot module
- holoviews.plotting.plotly.raster module
- holoviews.plotting.plotly.renderer module
- holoviews.plotting.plotly.selection module
- holoviews.plotting.plotly.shapes module
- holoviews.plotting.plotly.stats module
- holoviews.plotting.plotly.tabular module
- holoviews.plotting.plotly.tiles module
- holoviews.plotting.plotly.util module
- Module contents
- Submodules
Submodules#
- holoviews.plotting.links module
- holoviews.plotting.mixins module
- holoviews.plotting.plot module
- holoviews.plotting.renderer module
Renderer
Renderer.app()
Renderer.comm_manager
Renderer.components()
Renderer.export_widgets()
Renderer.get_plot()
Renderer.get_plot_state()
Renderer.get_size()
Renderer.html()
Renderer.load_nb()
Renderer.plot_options()
Renderer.plotting_class()
Renderer.save()
Renderer.server_doc()
Renderer.state()
Renderer.static_html()
Renderer.validate()
- holoviews.plotting.util module
CMapInfo
Warning
apply_nodata
attach_streams()
categorical_legend
color_intervals()
compute_overlayable_zorders()
compute_sizes()
dim_axis_label()
dim_range_key()
displayable()
dynamic_update()
flatten_stack
get_axis_padding()
get_directed_graph_paths()
get_dynamic_mode()
get_min_distance()
get_minimum_span()
get_nested_plot_frame()
get_plot_frame()
get_range()
get_sideplot_ranges()
hex2rgb()
initialize_dynamic()
initialize_unbounded()
is_dynamic_overlay()
isoverlay_fn()
linear_gradient()
list_cmaps()
map_colors()
mplcmap_to_palette()
overlay_depth()
polylinear_gradient()
process_cmap()
register_cmaps()
resample_palette()
rgb2hex()
scale_fontsize()
split_dmap_overlay()
traverse_setter()
undisplayable_info()
within_range()
Module contents#
HoloViews plotting sub-system that defines the interface to be used by any third-party plotting/rendering package.
This file defines the HTML tags used to wrap rendered output for display in the IPython Notebook (optional).
- class holoviews.plotting.Cycle(cycle=None, **params)[source]#
Bases:
Parameterized
A simple container class that specifies cyclic options. A typical example would be to cycle the curve colors in an Overlay composed of an arbitrary number of curves. The values may be supplied as an explicit list or a key to look up in the default cycles attribute.
Parameter Definitions
key = String(allow_None=True, default='default_colors', label='Key')
The key in the default_cycles dictionary used to specify the color cycle if values is not supplied.
values = List(bounds=(0, None), default=[], label='Values')
The values the cycle will iterate over.
- class holoviews.plotting.Plot(renderer=None, root=None, **params)[source]#
Bases:
Parameterized
Base class of all Plot classes in HoloViews, designed to be general enough to use any plotting package or backend.
Parameter Definitions
- refresh(**kwargs)[source]#
Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.
- property state#
The plotting state that gets updated via the update method and used by the renderer to generate output.
- class holoviews.plotting.Renderer(*, backend, center, css, dpi, fig, fps, holomap, mode, post_render_hooks, size, widget_location, widget_mode, info_fn, key_fn, name)[source]#
Bases:
Exporter
The job of a Renderer is to turn the plotting state held within Plot classes into concrete, visual output in the form of the PNG, SVG, MP4 or WebM formats (among others). Note that a Renderer is a type of Exporter and must therefore follow the Exporter interface.
The Renderer needs to be able to use the .state property of the appropriate Plot classes associated with that renderer in order to generate output. The process of ‘drawing’ is execute by the Plots and the Renderer turns the final plotting state into output.
Parameter Definitions
key_fn = Callable(allow_None=True, constant=True, label='Key fn')
Renderers do not support the saving of object key metadata
info_fn = Callable(allow_None=True, constant=True, label='Info fn')
Renderers do not support the saving of object info metadata
center = Boolean(default=True, label='Center')
Whether to center the plot
backend = String(default='', label='Backend')
The full, lowercase name of the rendering backend or third part plotting package used e.g. ‘matplotlib’ or ‘cairo’.
dpi = Integer(allow_None=True, inclusive_bounds=(True, True), label='Dpi')
The render resolution in dpi (dots per inch)
fig = Selector(default='auto', label='Fig', names={}, objects=['auto'])
Output render format for static figures. If None, no figure rendering will occur.
fps = Number(default=20, inclusive_bounds=(True, True), label='Fps')
Rendered fps (frames per second) for animated formats.
holomap = Selector(default='auto', label='Holomap', names={}, objects=['scrubber', 'widgets', None, 'auto'])
Output render multi-frame (typically animated) format. If None, no multi-frame rendering will occur.
mode = Selector(default='default', label='Mode', names={}, objects=['default', 'server'])
Whether to render the object in regular or server mode. In server mode a bokeh Document will be returned which can be served as a bokeh server app. By default renders all output is rendered to HTML.
size = Integer(default=100, inclusive_bounds=(True, True), label='Size')
The rendered size as a percentage size
widget_location = Selector(allow_None=True, label='Widget location', names={}, objects=['left', 'bottom', 'right', 'top', 'top_left', 'top_right', 'bottom_left', 'bottom_right', 'left_top', 'left_bottom', 'right_top', 'right_bottom'])
The position of the widgets relative to the plot.
widget_mode = Selector(default='embed', label='Widget mode', names={}, objects=['embed', 'live'])
The widget mode determining whether frames are embedded or generated ‘live’ when interacting with the widget.
css = Dict(class_=<class 'dict'>, default={}, label='Css')
Dictionary of CSS attributes and values to apply to HTML output.
post_render_hooks = Dict(class_=<class 'dict'>, default={'svg': [], 'png': []}, label='Post render hooks')
Optional dictionary of hooks that are applied to the rendered data (according to the output format) before it is returned. Each hook is passed the rendered data and the object that is being rendered. These hooks allow post-processing of rendered data before output is saved to file or displayed.
- app(plot, show=False, new_window=False, websocket_origin=None, port=0)[source]#
Creates a bokeh app from a HoloViews object or plot. By default simply attaches the plot to bokeh’s curdoc and returns the Document, if show option is supplied creates an Application instance and displays it either in a browser window or inline if notebook extension has been loaded. Using the new_window option the app may be displayed in a new browser tab once the notebook extension has been loaded. A websocket origin is required when launching from an existing tornado server (such as the notebook) and it is not on the default port (‘localhost:8888’).
- components(obj, fmt=None, comm=True, **kwargs)[source]#
Returns data and metadata dictionaries containing HTML and JS components to include render in app, notebook, or standalone document.
- export_widgets(obj, filename, fmt=None, template=None, json=False, json_path='', **kwargs)[source]#
Render and export object as a widget to a static HTML file. Allows supplying a custom template formatting string with fields to interpolate ‘js’, ‘css’ and the main ‘html’ containing the widget. Also provides options to export widget data to a json file in the supplied json_path (defaults to current path).
- get_plot(obj, doc=None, renderer=None, comm=None, **kwargs)[source]#
Given a HoloViews Viewable return a corresponding plot instance.
- get_plot_state(obj, renderer=None, **kwargs)[source]#
Given a HoloViews Viewable return a corresponding plot state.
- get_size(plot)[source]#
Return the display size associated with a plot before rendering to any particular format. Used to generate appropriate HTML display.
Returns a tuple of (width, height) in pixels.
- html(obj, fmt=None, css=None, resources='CDN', **kwargs)[source]#
Renders plot or data structure and wraps the output in HTML. The comm argument defines whether the HTML output includes code to initialize a Comm, if the plot supplies one.
- classmethod load_nb(inline=False, reloading=False, enable_mathjax=False)[source]#
Loads any resources required for display of plots in the Jupyter notebook
- classmethod plot_options(obj, percent_size)[source]#
Given an object and a percentage size (as supplied by the %output magic) return all the appropriate plot options that would be used to instantiate a plot class for that element.
Default plot sizes at the plotting class level should be taken into account.
- classmethod plotting_class(obj)[source]#
Given an object or Element class, return the suitable plotting class needed to render it with the current renderer.
- save(obj, basename, fmt='auto', key=None, info=None, options=None, resources='inline', title=None, **kwargs)[source]#
Save a HoloViews object to file, either using an explicitly supplied format or to the appropriate default.
- server_doc(obj, doc=None)[source]#
Get a bokeh Document with the plot attached. May supply an existing doc, otherwise bokeh.io.curdoc() is used to attach the plot to the global document instance.
- classmethod state()[source]#
Context manager to handle global state for a backend, allowing Plot classes to temporarily override that state.