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

Add example notebooks for Elements #1476

Merged
merged 28 commits into from May 31, 2017
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1494428
Added initial Element example notebooks
May 22, 2017
3de6330
Updated Area notebook and removed the stack_area operation
jlstevens May 30, 2017
a271989
Updated Bars notebook
jlstevens May 30, 2017
bd59626
Minor tweaks to BoxWhisker, Curve, ErrorBars and HSV notebooks
jlstevens May 30, 2017
18b529d
Updated the Image notebook
jlstevens May 30, 2017
e256c4e
Minor tweaks to Polygons, HeatMap, ItemTable notebooks
jlstevens May 31, 2017
3f0bd4a
Added QuadMesh element example
May 31, 2017
d6caed7
Completely reworked Points and Scatter notebooks to make them consistent
jlstevens May 31, 2017
bb8361b
Updated the QuadMesh notebook
jlstevens May 31, 2017
642fb10
Added Contours example notebook
May 31, 2017
5feada0
Updated the RGB and Raster notebooks
jlstevens May 31, 2017
a432434
Updated Spikes notebook
jlstevens May 31, 2017
a2002f3
Updated Contours, Spread, Table and VectorField notebooks
jlstevens May 31, 2017
4b8812f
Updated RGB notebook to demonstrate load_image method
jlstevens May 31, 2017
d209040
Added HLine, VLine, Spline and Text notebooks
jlstevens May 31, 2017
189befa
Added Box, Ellipse and Bounds notebooks
jlstevens May 31, 2017
61e1b45
Added Histogram and Path example notebooks
May 31, 2017
1de8082
Added matplotlib examples and updated first six of them
jlstevens May 31, 2017
067115a
Updated Ellipse, ErrorBars, HLine, HSV and HeatMap
jlstevens May 31, 2017
9a85d8f
Updated Image, ItemTable, Points and Polygon
jlstevens May 31, 2017
2ee601c
Updated the QuadMesh notebooks
jlstevens May 31, 2017
1e8f650
Updated RGB, Raster, Scatter, Spikes and Spline
jlstevens May 31, 2017
e801ac3
Updated VectorField Element example
May 31, 2017
bf9b395
Updated Spread, Table, Text, VectorField and VLine
jlstevens May 31, 2017
e8ddcf0
Updated Contours, Histogram, Path and VectorField
jlstevens May 31, 2017
6b74318
Added Arrow notebook
jlstevens May 31, 2017
14e8e22
Fixed links in matplotlib element notebooks
jlstevens May 31, 2017
8783197
Fixed matplotlib Bars example
May 31, 2017
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+33 −15
Diff settings

Always

Just for now

Minor tweaks to Polygons, HeatMap, ItemTable notebooks

  • Loading branch information...
jlstevens committed May 31, 2017
commit e256c4e08af4d388b96415aaaaea9dd33888a884
@@ -16,7 +16,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"import numpy as np\n",
@@ -30,13 +32,15 @@
"source": [
"``HeatMap`` visualises tabular data indexed by two key dimensions as a grid of colored values. This allows spotting correlations in multivariate data and provides a high-level overview of how the two variables are plotted.\n",
"\n",
"The data for a HeatMap may be supplied as 2D tabular data with one or more associated value dimensions. The first value dimension will be colormapped, but further value dimensions may be revealed using the hover tool."
"The data for a ``HeatMap`` may be supplied as 2D tabular data with one or more associated value dimensions. The first value dimension will be colormapped, but further value dimensions may be revealed using the hover tool."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"data = [(chr(65+i), chr(97+j), i*j) for i in range(5) for j in range(5) if i!=j]\n",
@@ -53,7 +57,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"heatmap = hv.HeatMap([(0, 0, 1), (0, 0, 10), (1, 0, 2), (1, 1, 3)])\n",
@@ -72,7 +78,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%%opts HeatMap [tools=['hover'] colorbar=True width=325 toolbar='above']\n",
@@ -97,7 +105,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
"version": "2.7.13"
}
},
"nbformat": 4,
@@ -16,7 +16,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"import numpy as np\n",
@@ -34,7 +36,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%%opts ItemTable [height=60]\n",
@@ -58,7 +62,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
"version": "2.7.13"
}
},
"nbformat": 4,
@@ -16,7 +16,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"import numpy as np\n",
@@ -28,15 +30,17 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"A ``Polygons`` object is similar to a ``Contours`` object except that each supplied path is closed and filled. Just like ``Contours``, optionally a ``level`` may be supplied; the Polygons will then be colored according to the supplied ``cmap``. Non-finite values such as ``np.NaN`` or ``np.inf`` will default to the supplied ``facecolor``.\n",
"A ``Polygons`` object is similar to a ``Contours`` object except that each supplied path is closed and filled. Just like ``Contours``, an optional ``level`` value may be supplied; the Polygons will then be colored according to the supplied ``cmap``. Non-finite values such as ``np.NaN`` or ``np.inf`` will default to the supplied ``facecolor``.\n",
"\n",
"Polygons with values can be used to build heatmaps with arbitrary shapes."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%%opts Polygons (cmap='hot' line_color='black' line_width=2)\n",
@@ -51,13 +55,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Polygons without a value are useful as annotation, but also allow us to draw arbitrary shapes."
"``Polygons`` without a value are useful as annotation, but also allow us to draw arbitrary shapes."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"def rectangle(x=0, y=0, width=1, height=1):\n",
@@ -85,7 +91,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
"version": "2.7.13"
}
},
"nbformat": 4,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.