Skip to content

Commit

Permalink
Support input of strings to theme (#2972)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 authored and philippjfr committed Oct 25, 2018
1 parent aa18fde commit 139ed6c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions examples/user_guide/Plotting_with_Bokeh.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,24 @@
"hv.Curve((xs, np.sin(xs)), label='foo')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You may also supply a name from Bokeh's built-in-themes:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"hv.renderer('bokeh').theme = 'light_minimal'\n",
"xs = np.linspace(0, np.pi*4, 100)\n",
"hv.Curve((xs, np.sin(xs)), label='foo')"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/bokeh/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

class BokehRenderer(Renderer):

theme = param.ClassSelector(default=None, class_=Theme, allow_None=True, doc="""
theme = param.ClassSelector(default=None, class_=(Theme, str), allow_None=True, doc="""
The applicable Bokeh Theme object (if any).""")

backend = param.String(default='bokeh', doc="The backend name.")
Expand Down

0 comments on commit 139ed6c

Please sign in to comment.