Edits to the 'Linking streams to plots' section
"source": [
"## Linking streams to plots\n",
"\n",
- "In the [Streams](./Streams.ipynb) tutorial we discovered that streams have ``subscribers``, which allow defining user defined callbacks on events, but also allow plots to subscribe to Stream updates. Linked streams add another concept on top of ``subscribers``, the ``source`` of a Stream.\n",
+ "At the end of the [Streams](./Streams.ipynb) tutorial 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",
"\n",
- "The source of a linked stream defines which plot element to receive events from. Any plot containing the ``source`` object will be linked to the stream and send events in response to changes.\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",
- "Let's start with a simple example. We will declare one of the linked Streams from above, the ``PointerXY`` stream. This stream sends the current mouse position in plot axes coordinates, which may be continuous or categorical. The first thing to note is that since we have passed no ``source`` the attribute is ``None``."
+ "Let's start with a simple example. We will declare one of the linked Streams from above, the ``PointerXY`` stream. This stream sends the current mouse position in plot axes coordinates, which may be continuous or categorical. The first thing to note is that we haven't specified a ``source`` which means it uses the default value of ``None``."
]
},
{
"outputs": [],
"source": [
"pointer = streams.PointerXY()\n",
- "print pointer.source"
+ "print(pointer.source)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
- "Before continuing we can check which keywords the Stream makes available to a user by printing it or looking at its contents:"
+ "Before continuing, we can check the stream parameters that are made available to user callbacks from a given stream instance by looking at its contents:"
]
},
{
"metadata": {},
"outputs": [],
"source": [
- "print('The %s stream contains: %r' % (pointer, pointer.contents))"
+ "print('The %s stream has contents %r' % (pointer, pointer.contents))"
]
},
{
