holoviews.plotting.plotly.util module#
- holoviews.plotting.plotly.util.clean_internal_figure_properties(fig)[source]#
Remove all HoloViews internal properties (those with leading underscores) from the input figure.
Note#
This function mutates the input figure
Parameters#
- figdict
The figure dictionary to process.
- holoviews.plotting.plotly.util.configure_matching_axes_from_dims(fig, matching_prop='_dim')[source]#
Configure matching axes for a figure
Note#
This function mutates the input figure
Parameters#
- figdict
The figure dictionary to process.
- matching_propstr
The name of the axis property that should be used to determine that two axes should be matched together. If the property is missing or None, axes will not be matched
- holoviews.plotting.plotly.util.figure_grid(figures_grid, row_spacing=50, column_spacing=50, share_xaxis=False, share_yaxis=False, width=None, height=None)[source]#
Construct a figure from a 2D grid of sub-figures
Parameters#
- figures_gridlist of list of (dict or None)
2D list of plotly figure dicts that will be combined in a grid to produce the resulting figure. None values maybe used to leave empty grid cells
- row_spacingfloat (default 50)
Vertical spacing between rows in the grid in pixels
- column_spacingfloat (default 50)
Horizontal spacing between columns in the grid in pixels coordinates
- share_xaxisbool (default False)
Share x-axis between sub-figures in the same column. Also link all x-axes in the figure. This will only work if each sub-figure has a single x-axis
- share_yaxisbool (default False)
Share y-axis between sub-figures in the same row. Also link all y-axes in the figure. This will only work if each subfigure has a single y-axis
- widthint (default None)
Final figure width. If not specified, width is the sum of the max width of the figures in each column
- heightint (default None)
Final figure width. If not specified, height is the sum of the max height of the figures in each row
Returns#
- dict
A plotly figure dict
- holoviews.plotting.plotly.util.get_colorscale(cmap, levels=None, cmin=None, cmax=None)[source]#
Converts a cmap spec to a plotly colorscale
Parameters#
cmap : A recognized colormap by name or list of colors levels : A list or integer declaring the color-levels cmin
The lower bound of the color range
- cmax
The upper bound of the color range
Returns#
A valid plotly colorscale
- holoviews.plotting.plotly.util.merge_figure(fig, subfig)[source]#
Merge a sub-figure into a parent figure
Note#
This function mutates the input fig dict, but it does not mutate the subfig dict
Parameters#
- figdict
The plotly figure dict into which the sub figure will be merged
- subfigdict
The plotly figure dict that will be copied and then merged into fig
- holoviews.plotting.plotly.util.merge_layout(obj, subobj)[source]#
Merge layout objects recursively
Note#
This function mutates the input obj dict, but it does not mutate the subobj dict
Parameters#
- objdict
dict into which the sub-figure dict will be merged
- subobjdict
dict that sill be copied and merged into obj