Skip to content

Commit

Permalink
minor doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ea42gh authored and jbednar committed Jul 31, 2017
1 parent b404228 commit aeccd50
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion examples/user_guide/09-Indexing_and_Selecting_Data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
"source": [
"%%output backend='matplotlib' size=120\n",
"sample_style = dict(edgecolors='k', alpha=1)\n",
"all_samples = obs_hmap.table().to.scatter3d().opts(style=dict(alpha=0.15))\n",
"all_samples = obs_hmap.table().to.scatter3d().opts(style=dict(alpha=0.15), plot={'xticks':4})\n",
"sampled = obs_hmap.sample((3,3))\n",
"subsamples = sampled.to.scatter3d().opts(style=sample_style)\n",
"all_samples * subsamples + sampled"
Expand Down
2 changes: 1 addition & 1 deletion examples/user_guide/11-Responding_to_Events.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@
"source": [
"First you might notice that the 'time' value is now shown in the title but that there is no corresponding time slider as its value is supplied by the stream.\n",
"\n",
"The 'time' parameter is now an instance of what are called 'dimensioned streams' which renable indexing of these dimensions:"
"The 'time' parameter is now an instance of what are called 'dimensioned streams' which reenable indexing of these dimensions:"
]
},
{
Expand Down
24 changes: 12 additions & 12 deletions examples/user_guide/12-Custom_Interactivity.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@
"* Responding to ``Tap`` and ``DoubleTap`` events to reveal more information in subplots.\n",
"* Computing statistics in response to selections applied with box- and lasso-select tools.\n",
"\n",
"Currently only the bokeh backend for HoloViews supports the linked streams system but the principles used should extend to any backend can define callbacks that fire when a user zooms or pans or interacts with a plot.\n",
"Currently only the bokeh backend for HoloViews supports the linked streams system but the principles used should extend to any backend that can define callbacks that fire when a user zooms or pans or interacts with a plot.\n",
"\n",
"<center><div class=\"alert alert-info\" role=\"alert\">To use and visualize <b>DynamicMap</b> or <b>Stream</b> objects you need to be running a live Jupyter server.<br>This tutorial assumes that it will be run in a live notebook environment.<br>\n",
"When viewed statically, DynamicMaps will only show the first available Element,<br></div></center>\n",
"When viewed statically, DynamicMaps will only show the first available Element.<br></div></center>\n",
"\n",
"## Available Linked Streams\n",
"\n",
"There are a huge number of ways one might want to interact with a plot. The HoloViews streams module aims to expose many of the most common interactions you might want want to employ, while also supporting extensibility via custom linked Streams. \n",
"\n",
"Here is the full list of linked Stream that are all descendents of the ``LinkedStream`` baseclass:"
"Here is the full list of linked Stream that are all descendants of the ``LinkedStream`` baseclass:"
]
},
{
Expand Down Expand Up @@ -71,7 +71,7 @@
"source": [
"As you can see, most of these events are about specific interactions with a plot such as the current axis ranges (the ``RangeX``, ``RangeY`` and ``RangeXY`` streams), the mouse pointer position (the ``PointerX``, ``PointerY`` and ``PointerXY`` streams), click or tap positions (``Tap``, ``DoubleTap``). Additionally there a streams to access plotting selections made using box- and lasso-select tools (``Selection1D``), the plot size (``PlotSize``) and the ``Bounds`` of a selection. \n",
"\n",
"Each of these linked Stream types has a corresponding backend specific ``Callback``, which defines which plot attributes or events to link the stream to and triggers events on the ``Stream`` in response to changes on the plot. Defining custom ``Stream`` and ``Callback`` types will be covered in the future guides."
"Each of these linked Stream types has a corresponding backend specific ``Callback``, which defines which plot attributes or events to link the stream to and triggers events on the ``Stream`` in response to changes on the plot. Defining custom ``Stream`` and ``Callback`` types will be covered in future guides."
]
},
{
Expand All @@ -80,7 +80,7 @@
"source": [
"## Linking streams to plots\n",
"\n",
"At the end of the [Responding to Events](./11-Responding_to_Events.ipynb) guide we discovered that streams have ``subscribers``, which allow defining user defined callbacks on events, but also allows HoloViews to install subscribers that allow plots to respond to Stream updates. Linked streams add another concept on top of ``subscribers``, namely the Stream ``source``.\n",
"At the end of the [Responding to Events](./11-Responding_to_Events.ipynb) guide we discovered that streams have ``subscribers``, which allow defining user defined callbacks on events, but also allow HoloViews to install subscribers that let plots respond to Stream updates. Linked streams add another concept on top of ``subscribers``, namely the Stream ``source``.\n",
"\n",
"The source of a linked stream defines which plot element to receive events from. Any plot containing the ``source`` object will be attached to the corresponding linked stream and will send event values in response to the appropriate interactions.\n",
"\n",
Expand Down Expand Up @@ -216,7 +216,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In the [Streams](Streams.ipynb) tutorial, we introduced an integral example that would work more intuitively with linked streams. Here it is again with the ``limit`` value controlled by the ``PointerX`` linked stream:"
"In the [Streams](Streams.ipynb) tutorial, we introduced an integration example that would work more intuitively with linked streams. Here it is again with the ``limit`` value controlled by the ``PointerX`` linked stream:"
]
},
{
Expand All @@ -235,7 +235,7 @@
"def integral(limit, time):\n",
" limit = -3 if limit is None else np.clip(limit,-3,3)\n",
" curve = hv.Curve((xs, function(xs, time)))[limit:]\n",
" area = hv.Area((xs, function(xs, time)))[:limit]\n",
" area = hv.Area ((xs, function(xs, time)))[:limit]\n",
" summed = area.dimension_values('y').sum() * 0.015 # Numeric approximation\n",
" return (area * curve * hv.VLine(limit) * hv.Text(limit + 0.8, 2.0, '%.2f' % summed))\n",
"\n",
Expand All @@ -254,7 +254,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We only needed to import and use ``PointerX`` stream and rename the ``x`` parameter that tracks the cursor position to 'limit' so that it maps to the corresponding argument. Otherwise, the example only required bokeh specific style options to match the matplotlib example as closely as possible."
"We only needed to import and use the ``PointerX`` stream and rename the ``x`` parameter that tracks the cursor position to 'limit' so that it maps to the corresponding argument. Otherwise, the example only required bokeh specific style options to match the matplotlib example as closely as possible."
]
},
{
Expand All @@ -263,7 +263,7 @@
"source": [
"#### Explicit linking\n",
"\n",
"In the example above, we took advantage of the fact that a ``DynamicMap`` automatically becomes the stream source if a source isn't explicitly specified. If we want to link the stream instance to a different object we can specify our our source explicitly. Here we will create a 2D ``Image`` of sine gratings, declare that is then declared as the ``source`` of the ``PointerXY`` stream. This pointer stream is then used to generate a single point that tracks the cursor when hovering over the image:"
"In the example above, we took advantage of the fact that a ``DynamicMap`` automatically becomes the stream source if a source isn't explicitly specified. If we want to link the stream instance to a different object we can specify our source explicitly. Here we will create a 2D ``Image`` of sine gratings, and then declare that this image is the ``source`` of the ``PointerXY`` stream. This pointer stream is then used to generate a single point that tracks the cursor when hovering over the image:"
]
},
{
Expand Down Expand Up @@ -404,11 +404,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In the basic [Streams](Streams.ipynb) tutorial we saw that stream parameters can be updated and those values are then passed to the callback. This model works well for many different types of streams that have a well-defined values at all times.\n",
"In the basic [Streams](Streams.ipynb) tutorial we saw that stream parameters can be updated and those values are then passed to the callback. This model works well for many different types of streams that have well-defined values at all times.\n",
"\n",
"This approach is not suitable for certain events which only have a well defined value at a particular point in time. For instance, when you hover your mouse over a plot, the hover position always has a well-defined value but the click position is only defined when a click occurs (if it occurs).\n",
"\n",
"This latter case are what are called 'transient' streams. These streams are supplied new values only when they occur and fall back to a default value at all other times. This default value is typically ``None`` to indicate that the event is not occuring and therefore has no data.\n",
"This latter case is an example of what are called 'transient' streams. These streams are supplied new values only when they occur and fall back to a default value at all other times. This default value is typically ``None`` to indicate that the event is not occuring and therefore has no data.\n",
"\n",
"\n",
"Transient streams are particularly useful when you are subscribed to multiple streams, some of which are only occasionally triggered. A good example are the ``Tap`` and ``DoubleTap`` streams; while you sometimes just want to know the last tapped position, we can only tell the two events apart if their values are ``None`` when not active. \n",
Expand All @@ -430,7 +430,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Next we define a list of taps we can append to and a function that performs that accumulates the tap and double tap coordinate along with the number of taps, returning a ``Points`` Element of the tap positions."
"Next we define a list of taps we can append to, and a function that accumulates the tap and double tap coordinates along with the number of taps, returning a ``Points`` Element of the tap positions."
]
},
{
Expand Down
10 changes: 5 additions & 5 deletions examples/user_guide/13-Data_Pipelines.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"It is very common to want to process some data, for this purpose HoloViews provides so called ``Operations``, which are described in detail in the [Transforming Elements](../user_guide/Transforming_Elements.ipynb). ``Operations`` are simply parameterized functions, which take HoloViews objects as input, transform them in some way and then return the output.\n",
"It is very common to want to process some data, for this purpose HoloViews provides so-called ``Operations``, which are described in detail in the [Transforming Elements](../user_guide/Transforming_Elements.ipynb). ``Operations`` are simply parameterized functions, which take HoloViews objects as input, transform them in some way and then return the output.\n",
"\n",
"In combination with [Dimensioned Containers](../user_guide/Dimensionsed_Containers.ipynb) such as ``HoloMap`` and ``GridSpace`` they are a powerful way to explore the effect of the parameters of your transform affect the data. We will start with a simple example, HoloViews provides a ``rolling`` function which smoothes timeseries data with a rolling window. We will apply this operation with a ``rolling_window`` of 30, i.e. roughly a month of our daily timeseries data:"
"In combination with [Dimensioned Containers](../user_guide/Dimensionsed_Containers.ipynb) such as ``HoloMap`` and ``GridSpace`` they are a powerful way to explore how the parameters of your transform affect the data. We will start with a simple example. HoloViews provides a ``rolling`` function which smoothes timeseries data with a rolling window. We will apply this operation with a ``rolling_window`` of 30, i.e. roughly a month of our daily timeseries data:"
]
},
{
Expand Down Expand Up @@ -109,7 +109,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In the previous section we briefly mentioned that in addition to regular widgets ``DynamicMap`` also supports streams, which allow us to define custom events our ``DynamicMap`` should subscribe to. To learn more about streams see the [Responding to Events](../user_guide/11-Responding_to_Events.ipynb). Here we will declare a quick stream that controls the rolling window:"
"In the previous section we briefly mentioned that in addition to regular widgets ``DynamicMap`` also supports streams, which allow us to define custom events our ``DynamicMap`` should subscribe to. To learn more about streams see the [Responding to Events](../user_guide/11-Responding_to_Events.ipynb). Here we will declare a stream that controls the rolling window:"
]
},
{
Expand Down Expand Up @@ -167,7 +167,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Instead of manually defining a function we can also do something much simpler, namely we can just apply the rolling operation to the original ``DynamicMap`` we defined and pass our ``rolling_stream`` to the operation. To make things a bit more interesting we will also apply the ``rolling_outlier_std`` function which computes outliers within the ``rolling_window``. We supply our stream to both"
"Instead of manually defining a function we can also do something much simpler, namely we can just apply the rolling operation to the original ``DynamicMap`` we defined and pass our ``rolling_stream`` to the operation. To make things a bit more interesting we will also apply the ``rolling_outlier_std`` function which computes outliers within the ``rolling_window``. We supply our stream to both:"
]
},
{
Expand Down Expand Up @@ -207,7 +207,7 @@
"source": [
"We can chain operations like this indefinitely and attach streams to each stage. By chaining we can watch our visualization update whenever we change a stream value anywhere in the pipeline and HoloViews will be smart about which parts of the pipeline are recomputed, which allows us to build complex visualizations very quickly.\n",
"\n",
"In later guides we will discover how to tie custom streams to custom widgets letting us easily control the stream values and making it trivial to define complex dashboards. ``paramNB`` is only one widget framework we could use, we could also use ``paramBokeh`` to use bokeh widgets and deploy the dashboard on bokeh server or manually linked ``ipywidgets`` to our streams. For more information on how to deploy bokeh apps from HoloViews and build dashboards see the [Deploying Bokeh Apps](./Deploying_Bokeh_Apps.ipynb) and [Dashboards](./15-Dashboards.ipynb) guides."
"In later guides we will discover how to tie custom streams to custom widgets letting us easily control the stream values and making it trivial to define complex dashboards. ``paramNB`` is only one widget framework we could use: we could also choose ``paramBokeh`` to make use of bokeh widgets and deploy the dashboard on bokeh server, or we could manually link ``ipywidgets`` to our streams. For more information on how to deploy bokeh apps from HoloViews and build dashboards see the [Deploying Bokeh Apps](./Deploying_Bokeh_Apps.ipynb) and [Dashboards](./15-Dashboards.ipynb) guides."
]
}
],
Expand Down
Loading

0 comments on commit aeccd50

Please sign in to comment.