Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

Commit

Permalink
Minor clarifications to doc, and fixed links.
Browse files Browse the repository at this point in the history
  • Loading branch information
ceball committed Dec 14, 2017
1 parent 92709dc commit b51d4c1
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions examples/user_guide/Bokeh_App.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In the [Introduction](https://ioam.github.io/parambokeh/user_guide/Introduction.ipynb), we showed how to use parambokeh inside a notebook. However, parambokeh widgets can be used in other contexts. Here we show how parambokeh can be used in a bokeh app.\n",
"In the [Introduction](Introduction.ipynb), we showed how to use parambokeh inside a notebook. However, parambokeh widgets can be used in other contexts. Here we show how parambokeh can be used in a bokeh app.\n",
"\n",
"We first declare some sample Parameterized classes with various Parameters to use as a demonstration object (see the [Introduction](https://ioam.github.io/parambokeh/user_guide/Introduction.ipynb) for more information):"
"In a python script, `simple.py`, we first declare a sample Parameterized classes with various Parameters to use as a demonstration object (see the [Introduction](Introduction.ipynb) for more information):"
]
},
{
Expand All @@ -23,7 +23,8 @@
"def hello(x, **kwargs):\n",
" print(\"Hello %s\" % x)\n",
" \n",
"class BaseClass(param.Parameterized):\n",
"class Example(param.Parameterized):\n",
" \"\"\"An example Parameterized class\"\"\"\n",
" x = param.Parameter(default=3.14,doc=\"X position\")\n",
" y = param.Parameter(default=\"Not editable\",constant=True)\n",
" string_value = param.String(default=\"str\",doc=\"A string\")\n",
Expand All @@ -36,9 +37,6 @@
" integer_range = param.Range(default=(3,7),bounds=(0, 10))\n",
" float_range = param.Range(default=(0,1.57),bounds=(0, 3.145))\n",
" dictionary = param.Dict(default={\"a\":2, \"b\":9})\n",
" \n",
"class Example(BaseClass):\n",
" \"\"\"An example Parameterized class\"\"\"\n",
" boolean = param.Boolean(True, doc=\"A sample Boolean parameter\")\n",
" color = param.Color(default='#FFFFFF')\n",
" date = param.Date(dt.datetime(2017, 1, 1),\n",
Expand All @@ -55,7 +53,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We then configure bokeh to create an html page, but you could skip this for a server app. See [bokeh's documentation](https://bokeh.pydata.org/en/latest/) for more information."
"We then configure bokeh to create an html file, but you could skip this for a server app. See [bokeh's documentation](https://bokeh.pydata.org/en/latest/) for more information."
]
},
{
Expand All @@ -74,7 +72,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we can create our widgets for the Example class - as we did for notebooks in the [Introduction](https://ioam.github.io/parambokeh/user_guide/Introduction.ipynb) - but specifying `mode=\"server\"`."
"Now we can create our widgets for the Example class - as we did for notebooks in the [Introduction](Introduction.ipynb), but here specifying `mode=\"server\"`."
]
},
{
Expand Down Expand Up @@ -127,8 +125,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You could instead run something like `bokeh serve --show simple.py` to get a live app.\n",
"\n",
"You can then open `simple.html` in a web browser (which we do here by including it in an iframe):"
]
},
Expand All @@ -141,6 +137,13 @@
"import IPython\n",
"IPython.display.HTML('<iframe src=' + \"simple.html\" + ' width=500 height=1000></iframe>')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You could instead run something like `bokeh serve --show simple.py` to get a live app rather than a static one."
]
}
],
"metadata": {
Expand Down

0 comments on commit b51d4c1

Please sign in to comment.