Skip to content

Commit

Permalink
Updated Spread, Table, Text, VectorField and VLine
Browse files Browse the repository at this point in the history
  • Loading branch information
jlstevens committed May 31, 2017
1 parent 1e8f650 commit bf9b395
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 19 deletions.
3 changes: 3 additions & 0 deletions examples/elements/bokeh/Spread.ipynb
Expand Up @@ -32,6 +32,9 @@
"source": [
"``Spread`` elements have the same data format as the [``ErrorBars``](ErrorBars.ipynb) element, namely x- and y-values with associated symmetric or assymetric errors, but are interpreted as samples from a continuous distribution (just as ``Curve`` is the continuous version of ``Scatter``). These are often paired with an overlaid ``Curve`` to show an average trend along with a corresponding spread of values; see the [Columnar Data tutorial](Columnar_Data.ipynb) for examples. \n",
"\n",
"Note that as the ``Spread`` element is used to add information to a plot (typically a ``Curve``) the default alpha value is less that one, making it partially transparent. \n",
"\n",
"\n",
"##### Symmetric"
]
},
Expand Down
6 changes: 3 additions & 3 deletions examples/elements/bokeh/Table.ipynb
Expand Up @@ -83,7 +83,7 @@
"outputs": [],
"source": [
"%%opts Table [height=140]\n",
"hv.Table((gender, age, weight, height), kdims = ['Gender', 'Age'], vdims=['Weight', 'Height'])"
"table = hv.Table((gender, age, weight, height), kdims = ['Gender', 'Age'], vdims=['Weight', 'Height'])"
]
},
{
Expand Down Expand Up @@ -133,9 +133,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:science]",
"display_name": "Python 2",
"language": "python",
"name": "conda-env-science-py"
"name": "python2"
},
"language_info": {
"codemirror_mode": {
Expand Down
8 changes: 5 additions & 3 deletions examples/elements/matplotlib/Spread.ipynb
Expand Up @@ -23,14 +23,16 @@
"source": [
"import numpy as np\n",
"import holoviews as hv\n",
"hv.notebook_extension('bokeh')"
"hv.notebook_extension()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"``Spread`` elements have the same data format as the [``ErrorBars``](ErrorBars.ipynb) element, namely x- and y-values with associated symmetric or assymetric errors, but are interpreted as samples from a continuous distribution (just as ``Curve`` is the continuous version of ``Scatter``). These are often paired with an overlaid ``Curve`` to show an average trend along with a corresponding spread of values; see the [Columnar Data tutorial](Columnar_Data.ipynb) for examples. \n",
"``Spread`` elements have the same data format as the [``ErrorBars``](ErrorBars.ipynb) element, namely x- and y-values with associated symmetric or assymetric errors, but are interpreted as samples from a continuous distribution (just as ``Curve`` is the continuous version of ``Scatter``). These are often paired with an overlaid ``Curve`` to show an average trend along with a corresponding spread of values; see the [Columnar Data tutorial](Columnar_Data.ipynb) for examples.\n",
"\n",
"Note that as the ``Spread`` element is used to add information to a plot (typically a ``Curve``) the default alpha value is less that one, making it partially transparent. \n",
"\n",
"##### Symmetric"
]
Expand Down Expand Up @@ -78,7 +80,7 @@
},
"outputs": [],
"source": [
"%%opts Spread (fill_color='indianred' fill_alpha=1)\n",
"%%opts Spread (facecolor='indianred' alpha=1)\n",
"xs = np.linspace(0, np.pi*2, 20)\n",
"hv.Spread((xs, np.sin(xs), 0.1+np.random.rand(len(xs)), 0.1+np.random.rand(len(xs))),\n",
" vdims=['y', 'yerrneg', 'yerrpos'])"
Expand Down
12 changes: 5 additions & 7 deletions examples/elements/matplotlib/Table.ipynb
Expand Up @@ -23,7 +23,7 @@
"source": [
"import numpy as np\n",
"import holoviews as hv\n",
"hv.notebook_extension('bokeh')"
"hv.notebook_extension()"
]
},
{
Expand Down Expand Up @@ -62,7 +62,6 @@
},
"outputs": [],
"source": [
"%%opts Table [height=140]\n",
"hv.Table({'Gender':gender, 'Age':age, 'Weight':weight, 'Height':height},\n",
" kdims = ['Gender', 'Age'], vdims=['Weight', 'Height'])"
]
Expand All @@ -82,8 +81,8 @@
},
"outputs": [],
"source": [
"%%opts Table [height=140]\n",
"hv.Table((gender, age, weight, height), kdims = ['Gender', 'Age'], vdims=['Weight', 'Height'])"
"table = hv.Table((gender, age, weight, height), kdims = ['Gender', 'Age'], vdims=['Weight', 'Height'])\n",
"table"
]
},
{
Expand All @@ -101,7 +100,6 @@
},
"outputs": [],
"source": [
"%%opts Table [height=100]\n",
"table.select(Gender='M') + table.select(Gender='M', Age=10)"
]
},
Expand Down Expand Up @@ -133,9 +131,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:science]",
"display_name": "Python 2",
"language": "python",
"name": "conda-env-science-py"
"name": "python2"
},
"language_info": {
"codemirror_mode": {
Expand Down
2 changes: 1 addition & 1 deletion examples/elements/matplotlib/Text.ipynb
Expand Up @@ -23,7 +23,7 @@
"source": [
"import numpy as np\n",
"import holoviews as hv\n",
"hv.notebook_extension('bokeh')"
"hv.notebook_extension()"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions examples/elements/matplotlib/VLine.ipynb
Expand Up @@ -23,7 +23,7 @@
"source": [
"import numpy as np\n",
"import holoviews as hv\n",
"hv.notebook_extension('bokeh')"
"hv.notebook_extension()"
]
},
{
Expand All @@ -41,7 +41,7 @@
},
"outputs": [],
"source": [
"%%opts VLine (color='red' line_width=6) Curve (color='#D3D3D3')\n",
"%%opts VLine (color='red' linewidth=6) Curve (color='#D3D3D3')\n",
"xs = np.linspace(-5,5,100)\n",
"ys = -(xs-2)**2\n",
"hv.Curve((xs,ys)) * hv.VLine(xs[ys.argmax()])"
Expand Down
6 changes: 3 additions & 3 deletions examples/elements/matplotlib/VectorField.ipynb
Expand Up @@ -23,7 +23,7 @@
"source": [
"import numpy as np\n",
"import holoviews as hv\n",
"hv.notebook_extension('bokeh')"
"hv.notebook_extension()"
]
},
{
Expand Down Expand Up @@ -67,9 +67,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:science]",
"display_name": "Python 2",
"language": "python",
"name": "conda-env-science-py"
"name": "python2"
},
"language_info": {
"codemirror_mode": {
Expand Down

0 comments on commit bf9b395

Please sign in to comment.