Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs and minor code fixes #1805

Merged
merged 52 commits into from
Aug 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
a12ff3f
__call__ to .opts() mods
Jul 27, 2017
af615e4
__call__ to .opts() mods
Jul 27, 2017
67b41ed
__call__ to .opts() mods
Jul 27, 2017
a4a88d0
Merge branch 'master' into docs_and_minor_code_fixes
Jul 29, 2017
62e5030
minor corrections
Jul 29, 2017
fb7e130
made all suggested corrections
Jul 29, 2017
b55a3d2
made all suggested corrections
Jul 29, 2017
8978b21
fix typos and some phrasing
Jul 29, 2017
d609076
minor spelling corrections
Jul 29, 2017
d5c7d9e
minor corrections
Jul 30, 2017
ec7ac59
minor doc fixes
Jul 31, 2017
7f6534a
Fixed clone on NdLayout to propagate cols properly (#1739)
jlstevens Jul 31, 2017
69a25aa
HTML fix in logo for export (#1778)
jlstevens Aug 2, 2017
e7fd0da
Enabled warnings about the use of __call__ on travis (#1779)
jlstevens Aug 3, 2017
de9ba5b
Fixes to setup.py for pip install (#1782)
jlstevens Aug 3, 2017
b9f5b6e
Converted CHANGELOG to markdown (#1788)
jlstevens Aug 4, 2017
90b5995
Bumped version to 1.8.2
jlstevens Aug 4, 2017
9a18c6f
Updated Python version classifiers in setup.py
jlstevens Aug 4, 2017
2b6760b
Updated long_description in setup.py to PyPI blurb
jlstevens Aug 4, 2017
dd575fb
Added datashader regridding operation (#1773)
philippjfr Aug 4, 2017
39e27ad
Periodic utility now stops when StopIteration is raised (#1792)
jlstevens Aug 8, 2017
1bef7ca
Updated nbpublisher submodule reference
jlstevens Aug 9, 2017
7d65abc
Replaced deprecated VBox and HBox imports (#1804)
philippjfr Aug 10, 2017
80bcb74
made all suggested corrections
Jul 29, 2017
ed40c98
made all suggested corrections
Jul 29, 2017
ff54fd9
fixed some more phrasing
ea42gh Aug 12, 2017
d875d1e
merged minor change
ea42gh Aug 12, 2017
45a9641
minor changes to improve readability of text
ea42gh Aug 12, 2017
31eb966
minor changes to phrasing to improve readability
ea42gh Aug 12, 2017
843b7fc
minor changes to phrasing to improve readability
ea42gh Aug 12, 2017
da1f227
minor changes to phrasing to improve readability
ea42gh Aug 12, 2017
94687da
minor changes to phrasing to improve readability
ea42gh Aug 12, 2017
abe857c
minor changes to phrasing to improve readability
ea42gh Aug 12, 2017
4d83b0c
minor changes to phrasing to improve readability
ea42gh Aug 12, 2017
aa28730
minor changes to phrasing to improve readability
ea42gh Aug 12, 2017
0feeb69
minor changes to phrasing to improve readability
ea42gh Aug 12, 2017
90b1911
minor changes to improve readability of text
ea42gh Aug 12, 2017
0a3c528
made all suggested corrections
Jul 29, 2017
00cf29c
made all suggested corrections
Jul 29, 2017
b779f34
fixed some more phrasing
ea42gh Aug 12, 2017
b752e79
merged minor change
ea42gh Aug 12, 2017
32a8103
minor changes to improve readability of text
ea42gh Aug 12, 2017
271a4e1
minor changes to phrasing to improve readability
ea42gh Aug 12, 2017
ee531c2
minor changes to phrasing to improve readability
ea42gh Aug 12, 2017
d567ac7
minor changes to phrasing to improve readability
ea42gh Aug 12, 2017
74106a8
minor changes to phrasing to improve readability
ea42gh Aug 12, 2017
f43df81
minor text change to improve readability
ea42gh Aug 12, 2017
790b792
ran strip_kernel.sh on the notebooks
ea42gh Aug 13, 2017
1129c1b
Merge branch 'docs_and_minor_code_fixes' of https://github.com/ea42gh…
ea42gh Aug 13, 2017
0ab58a6
ran strip_kernel.sh
ea42gh Aug 13, 2017
4e5cce1
cleared out output cells
ea42gh Aug 13, 2017
9ddebe2
ran strip_kernel
ea42gh Aug 13, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/Tutorials/Columnar_Data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Most types require the data to be non-duplicated before being displayed. For this purpose, HoloViews makes it easy to ``aggregate`` and ``reduce`` the data. These two operations are simple inverses of each other--aggregate computes a statistic for each group in the supplied dimensions, while reduce combines all the groups except the supplied dimensions. Supplying only a function and no dimensions will simply aggregate or reduce all available key dimensions."
"Most types require the data to be non-duplicated before being displayed. For this purpose, HoloViews makes it easy to ``aggregate`` and ``reduce`` the data. These two operations are simple complements of each other--aggregate computes a statistic for each group in the supplied dimensions, while reduce combines all the groups except the supplied dimensions. Supplying only a function and no dimensions will simply aggregate or reduce all available key dimensions."
]
},
{
Expand Down Expand Up @@ -898,5 +898,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}
2 changes: 1 addition & 1 deletion doc/Tutorials/Containers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -561,5 +561,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}
2 changes: 1 addition & 1 deletion doc/Tutorials/Exporting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -457,5 +457,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}
2 changes: 1 addition & 1 deletion doc/Tutorials/Options.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -632,5 +632,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}
2 changes: 1 addition & 1 deletion examples/reference/elements/bokeh/Spikes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"When supplying a second dimension to the ``Spikes`` element as a value dimensions, these additional values will be mapped onto the line height. Optionally, you may also supply a colormap ``cmap`` and ``color_index`` to map the value dimensions to a suitable set of colors. This way we can, for example, plot a [mass spectrogram](https://en.wikipedia.org/wiki/Mass_spectrometry):"
"When supplying a second dimension to the ``Spikes`` element as a value dimension, these additional values will be mapped onto the line height. Optionally, you may also supply a colormap ``cmap`` and ``color_index`` to map the value dimensions to a suitable set of colors. This way we can, for example, plot a [mass spectrogram](https://en.wikipedia.org/wiki/Mass_spectrometry):"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/user_guide/04-Dimensioned_Containers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Exploring a parameter space using widgets is one of the most flexible approaches but as we noted above it also makes it difficult to compare between different parameter values. HoloViews therefore supplies several container objects, which behave similarly to a ``HoloMap`` but have a visual representation showing the effect of all parameter values simultaneously:\n",
"Exploring a parameter space using widgets is one of the most flexible approaches but as we noted above it also makes it difficult to compare between different parameter values. HoloViews therefore supplies several container objects, which behave similarly to a ``HoloMap`` but have a different visual representation:\n",
"\n",
"* NdOverlay - An n-dimensional container which overlays the elements\n",
"* NdLayout - An n-dimensional container which displays the data in separate plot axes and adds titles for each value\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/user_guide/07-Tabular_Datasets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Most types require the data to be non-duplicated before being displayed. For this purpose, HoloViews makes it easy to ``aggregate`` and ``reduce`` the data. These two operations are simple inverses of each other--aggregate computes a statistic for each group in the supplied dimensions, while reduce combines all the groups except the supplied dimensions. Supplying only a function and no dimensions will simply aggregate or reduce all available key dimensions."
"Most types require the data to be non-duplicated before being displayed. For this purpose, HoloViews makes it easy to ``aggregate`` and ``reduce`` the data. These two operations are simple complements of each other--aggregate computes a statistic for each group in the supplied dimensions, while reduce combines all the groups except the supplied dimensions. Supplying only a function and no dimensions will simply aggregate or reduce all available key dimensions."
]
},
{
Expand Down
49 changes: 21 additions & 28 deletions examples/user_guide/Plots_and_Renderers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"HoloViews ordinarily hides the plotting machinery from the user, this allows for very quickly iterating over different visualization and exploring a dataset, however often times it is important to customize the precise details of a plot. HoloViews makes it very easy to customize existing plots, or even create completely novel plots. This manual will provide a general overview of the plotting system.\n",
"HoloViews ordinarily hides the plotting machinery from the user. This allows for very quick iteration over different visualizations to explore a dataset, however it is often important to customize the precise details of a plot. HoloViews makes it very easy to customize existing plots, or even create completely novel plots. This manual will provide a general overview of the plotting system.\n",
"\n",
"The separation of the data from the precise details of the visualization is one of the core principles of the HoloViews. [``Elements``](http://holoviews.org/reference/index.html#elements) provide thin wrappers around chunks of actual data, while [containers](http://holoviews.org/reference/index.html#containers) allow composing these Elements into overlays, layouts, grids and animations/widgets. Each Element or container type has a corresponding plotting class, which renders a visual representation of the data for a particular backend. While the precise details of the implementation differ between backends to accommodate the vastly different APIs plotting backends provide, many of the high-level details are shared across backends.\n",
"\n",
Expand All @@ -37,7 +37,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The Store object provides a global registry not only for the plots themselves but also creates an entry in the OptionsTree for that particular backend. This allows options for that backend to be validated and enables setting plot, style and normalization options via the [Options](Options.ipynb) system. We can view the ``OptionsTree`` object by requestion it from the store. We'll make a copy with just the first few entries so we can view the structure of the tree:"
"The Store object provides a global registry not only for the plots themselves but also creates an entry in the OptionsTree for that particular backend. This allows options for that backend to be validated and enables setting plot, style and normalization options via the [Options](Options.ipynb) system. We can view the ``OptionsTree`` object by requesting it from the store. We'll make a copy with just the first few entries so we can view the structure of the tree:"
]
},
{
Expand All @@ -56,7 +56,7 @@
"source": [
"# Renderers\n",
"\n",
"HoloViews provides a general ``Renderer`` baseclass, which defines a general interface to render the output from different backends to a number of standard output formats such as ``png``, ``html`` or ``svg``. The ``__call__`` method on the Renderer automatically looks up and instantiates the registered plotting classes for object it is passed and then returns the output in the requested format. To make this a bit clearer we'll break this down step by step, first we'll get a handle on the ``MPLRenderer`` and create an object to render.\n",
"HoloViews provides a general ``Renderer`` baseclass, which defines a general interface to render the output from different backends to a number of standard output formats such as ``png``, ``html`` or ``svg``. The ``__call__`` method on the Renderer automatically looks up and instantiates the registered plotting classes for an object it is passed and then returns the output in the requested format. To make this a bit clearer we'll break this down step by step. First we'll get a handle on the ``MPLRenderer`` and create an object to render.\n",
"\n",
"Renderers aren't registered with the Store until the corresponding backends have been imported. Loading the notebook extension with ``hv.notebook_extension('matplotlib')`` is one way of loading a backend and registering a renderer. Another is to simply import the corresponding plotting module as we did above."
]
Expand All @@ -74,7 +74,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This is only one way to access a Renderer, another is to instantiate a Renderer instance directly, allowing you to override some of the default plot options."
"This is one way to access a Renderer, another is to instantiate a Renderer instance directly, allowing you to override some of the default plot options."
]
},
{
Expand Down Expand Up @@ -143,7 +143,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We will revisit how to work with ``Plot`` instances later for now all we need to know is that they are responsible for translating the HoloViews object (like the ``Curve``) into a backend specific plotting object, accessible on ``Plot.state``:"
"We will revisit how to work with ``Plot`` instances later. For now all we need to know is that they are responsible for translating the HoloViews object (like the ``Curve``) into a backend specific plotting object, accessible on ``Plot.state``:"
]
},
{
Expand All @@ -160,7 +160,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In case of the matplotlib backend this is a ``Figure`` object. However the ``Renderer`` ignores the specific representation of the plot providing a unified interface to translating it into a representation that can displayed, i.e. either an image format or an HTML representation.\n",
"In case of the matplotlib backend this is a ``Figure`` object. However the ``Renderer`` ignores the specific representation of the plot, instead providing a unified interface to translating it into a representation that can displayed, i.e. either an image format or an HTML representation.\n",
"\n",
"In this way we can convert the curve directly to its ``png`` representation by calling the ``Renderer`` with the object and the format:"
]
Expand Down Expand Up @@ -236,7 +236,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Another convenient way to render the object is wrap it in HTML, which we can do with the ``html`` method:"
"Another convenient way to render the object is to wrap it in HTML, which we can do with the ``html`` method:"
]
},
{
Expand Down Expand Up @@ -272,7 +272,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"However most of the time it is more convenient to let the Renderer to export the widget HTML, again via a convenient method, which will export a HTML document with all the required JS and CSS dependencies:"
"However most of the time it is more convenient to let the Renderer export the widget HTML, again via a convenient method, which will export a HTML document with all the required JS and CSS dependencies:"
]
},
{
Expand All @@ -284,24 +284,17 @@
"display_html(renderer.static_html(holomap), raw=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This covers the basics of working with HoloViews renderers, and this API is consistent across plotting backends, whether that is matplotlib, bokeh or plotly.\n",
"This covers the basics of working with HoloViews renderers. This API is consistent across plotting backends, whether matplotlib, bokeh or plotly.\n",
"\n",
"# Plots\n",
"\n",
"Above we saw how the Renderer looks up the appropriate plotting class but so far we haven't seen how the plotting actually works. Since HoloViews already nests the data into semantically meaningful components, which define the rough layout of the plots on the page, the plotting classes follow roughly the same hierarchy. To review this hierarchy have a look at the [nesting diagram](./05-Building_Composite_Objects.ipynb#Nesting-hierarchy-) in the Building Composite objects guide.\n",
"\n",
"The Layout and GridSpace plotting classes set up the figure and axes appropriately and then instantiate the subplots for all the objects that are contained within. For this purpose we will create a relative complex object, a ``Layout`` of ``HoloMap``s containing ``Overlay``s containing ``Elements``. We'll instantiate the matching plotting hierarchy and then inspect it."
"The Layout and GridSpace plotting classes set up the figure and axes appropriately and then instantiate the subplots for all the objects that are contained within. For this purpose we will create a relatively complex object, a ``Layout`` of ``HoloMap``s containing ``Overlay``s containing ``Elements``. We'll instantiate the matching plotting hierarchy and then inspect it."
]
},
{
Expand All @@ -328,14 +321,14 @@
"metadata": {},
"outputs": [],
"source": [
"print repr(layout)"
"print( repr(layout) )"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now that we've created the object we can again use both the ``MPLRenderer`` to instantiate the plot:"
"Now that we've created the object we can again use the ``MPLRenderer`` to instantiate the plot:"
]
},
{
Expand Down Expand Up @@ -369,7 +362,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This plotting layer handles plots adjoined to the plot, and are indexed by their position in the AdjointLayout which may include 'top', 'right' and 'main':"
"This plotting layer handles plots adjoined to the plot. They are indexed by their position in the AdjointLayout which may include 'top', 'right' and 'main':"
]
},
{
Expand All @@ -386,7 +379,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we've drilled all the way down to the OverlayPlot level, as expected this contains two further subplots, one for the ``Image`` and one for ``Text`` Element. "
"Now we've drilled all the way down to the OverlayPlot level, we see as expected that this contains two further subplots, one for the ``Image`` and one for ``Text`` Element. "
]
},
{
Expand All @@ -411,7 +404,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"When working with such deeply nested plots accessing the leafs can be a lot of effort, therefore the plots also provide a ``traverse`` method letting you specify the types of plots you want to access:"
"When working with such deeply nested plots accessing leafs can be a lot of effort, therefore the plots also provide a ``traverse`` method letting you specify the types of plots you want to access:"
]
},
{
Expand All @@ -431,13 +424,13 @@
"\n",
"There a few methods shared by all plotting classes, which allow the renderer to easily create, update and render a plot. The three most important methods and attributes are:\n",
"\n",
"* ``Plot.__init__`` - The constructor already handles a lot of the processing in a plot, it sets up all the subplots if there are any, computes ranges across the object to normalize the display, sets the options that were specified and opens instantiates the figure, axes, model graphs, or canvas objects dependening on the backend.\n",
"* ``Plot.initialize_plot`` - This draws the initial frame to the appopriate figure, axis or canvas, setting up the various artists (matplotlib) or glyphs (bokeh).\n",
"* ``Plot.__init__`` - The constructor already handles a lot of the processing in a plot, it sets up all the subplots if there are any, computes ranges across the object to normalize the display, sets the options that were specified and instantiates the figure, axes, model graphs, or canvas objects dependening on the backend.\n",
"* ``Plot.initialize_plot`` - This method draws the initial frame to the appopriate figure, axis or canvas, setting up the various artists (matplotlib) or glyphs (bokeh).\n",
"* ``Plot.update`` - This method updates an already instantiated plot with the data corresponding to the supplied key. This key should match the key in the HoloMap.\n",
"\n",
"### Initializing\n",
"\n",
"The Renderer and the widgets use these three methods to instantiate a plot and update to render both static frames and animations or widgets as defined by the ``HoloMap`` or ``DynamicMap``. Above we already instantiated a plot, now we initialize it drawing the first (or rather last frame)."
"The Renderer and the widgets use these three methods to instantiate and update a plot to render both static frames and animations or widgets as defined by the ``HoloMap`` or ``DynamicMap``. Above we already instantiated a plot, now we initialize it, thereby drawing the first (or rather last frame)."
]
},
{
Expand All @@ -456,7 +449,7 @@
"source": [
"### Updating\n",
"\n",
"We can see it has rendered the last frame with the key ``4``, we can update the figure with another key simply by calling the ``Plot.update`` method with the corresponding key."
"We can see ``initialize_plot`` has rendered the last frame with the key ``4``. We can update the figure with another key simply by calling the ``Plot.update`` method with the corresponding key."
]
},
{
Expand All @@ -483,7 +476,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Internally each level of the plotting hierarchy calls updates all the objects below it all the way down to the ElementPlots, which handle updating the plotting data."
"Internally each level of the plotting hierarchy updates all the objects below it, all the way down to the ElementPlots, which handle updating the plotting data."
]
},
{
Expand Down Expand Up @@ -556,7 +549,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Here we can see how the ``PointPlot`` keeps track of the artist, which is a matplotlib PathCollection``, the axis, the figure and the plot title. In addition all matplotlib plots also keep track of a list of any additional plotting elements which should be considered in the bounding box calculation."
"Here we can see how the ``PointPlot`` keeps track of the artist, which is a matplotlib ``PathCollection``, the axis, the figure and the plot title. In addition all matplotlib plots also keep track of a list of any additional plotting elements which should be considered in the bounding box calculation."
]
},
{
Expand Down
27 changes: 4 additions & 23 deletions examples/user_guide/Plotting_with_Matplotlib.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand Down Expand Up @@ -79,9 +77,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"metadata": {},
"outputs": [],
"source": [
"x = np.arange(-3.0,3.0,0.1)\n",
Expand Down Expand Up @@ -119,9 +115,7 @@
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"metadata": {},
"source": [
"The ``fig=\"png\"`` part of the ``%%output`` magic above specified that the file should be saved in PNG format, which is useful for posting on web pages or editing in raster-based graphics programs. It also specified that if the object contained a ``HoloMap`` (which this particular one does not), it would be saved in GIF format, which supports animation. Because of the need for animation, objects containing a ``HoloMap`` are handled specially, as animation is not supported by the common PNG or SVG formats.\n",
"\n",
Expand Down Expand Up @@ -165,22 +159,9 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.3"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
Expand Down