Skip to content

Commit

Permalink
Backported HoloViews docs
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Oct 3, 2019
1 parent af111cc commit 9d0c55d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions examples/reference/panes/HoloViews.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
"For layout and styling related parameters see the [customization user guide](../../user_guide/Customization.ipynb).\n",
"\n",
"* **``backend``** (str): Any of the supported HoloViews backends ('bokeh', 'matplotlib', or 'plotly')\n",
"* **``center``** (boolean): Whether to center the plot\n",
"* **``object``** (object): The HoloViews object being displayed\n",
"* **``widget_location``** (str): Where to lay out the widget relative to the plot \n",
"* **``widget_layout``** (ListPanel type): The object to lay the widgets out in, one of ``Row``, ``Column`` or ``WidgetBox``\n",
"* **``widget_type``** (str): Whether to generate individual widgets for each dimension, or to use a global linear scrubber with dimensions concatenated.\n",
"* **``widgets``** (dict): A mapping from dimension name to a widget class, instance, or dictionary of overrides to modify the default widgets.\n",
"\n",
Expand Down Expand Up @@ -122,6 +125,32 @@
" hv_panel[0])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"However, more conveniently the HoloViews pane offers options to lay out the plot and widgets in a number of preconfigured arrangements using the ``center`` and ``widget_location`` parameters."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"pn.panel(dmap, center=True, widget_location='right_bottom')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The ``widget_location`` parameter accepts all of the following options:\n",
" \n",
" ['left', 'bottom', 'right', 'top', 'top_left', 'top_right', 'bottom_left',\n",
" 'bottom_right', 'left_top', 'left_bottom', 'right_top', 'right_bottom']"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
1 change: 1 addition & 0 deletions panel/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ def __setitem__(self, index, panes):
(expected, type(self).__name__))
for i, pane in zip(range(start, end), panes):
new_objects[i] = panel(pane)

self.objects = new_objects

def clone(self, *objects, **params):
Expand Down

0 comments on commit 9d0c55d

Please sign in to comment.