Skip to content

Commit

Permalink
Merge 5426f90 into 5a606f1
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Feb 11, 2016
2 parents 5a606f1 + 5426f90 commit 2ac261c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions doc/Homepage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"HoloViews is a [Python](http://python.org) library that makes analyzing and visualizing scientific or engineering data much simpler, more intuitive, and more easily reproducible. Without HoloViews, there are typically many steps required before you can see your data, whether you use a GUI interactively or write a function or script to build up a plot. HoloViews instead lets you store your data in an annotated format that is instantly visualizable, with immediate access to both the numeric data *and* its visualization. For instance, if you wrap a two-dimensional dataset like the fractal below ([mandelbrot.npy](https://github.com/ioam/holoviews/raw/master/doc/mandelbrot.npy)) in a HoloViews ``Image`` object named ``fractal``, you can just type ``fractal`` to view it as an image in an [IPython/Jupyter Notebook](http://ipython.org/notebook/). Most importantly, combining it with other objects is now easy -- you can e.g. view it annotated with a horizontal line and a histogram, next to a slice of it from the indicated cross-section, all without writing any plotting code:"
"HoloViews is a [Python](http://python.org) library that makes analyzing and visualizing scientific or engineering data much simpler, more intuitive, and more easily reproducible. Without HoloViews, there are typically many steps required before you can see your data, whether you use a GUI interactively or write a function or script to build up a plot. HoloViews instead lets you store your data in an annotated format that is instantly visualizable, with immediate access to both the numeric data *and* its visualization. \n",
"\n",
"For instance, if you wrap a two-dimensional dataset like the fractal below ([mandelbrot.npy](https://github.com/ioam/holoviews/raw/master/doc/mandelbrot.npy)) in a HoloViews ``Image`` object named ``fractal``, you can just type ``fractal`` to view it as an image in an [IPython/Jupyter Notebook](http://ipython.org/notebook/). Most importantly, combining it with other objects is now easy -- you can e.g. view it annotated with a horizontal line and a histogram, next to a slice of it from the indicated cross-section, all without writing any plotting code:"
]
},
{
Expand All @@ -17,7 +19,7 @@
"source": [
"import numpy as np\n",
"import holoviews as hv\n",
"hv.notebook_extension('matplotlib')\n",
"hv.notebook_extension('bokeh')\n",
"fractal = hv.Image(np.load('mandelbrot.npy'))\n",
"\n",
"((fractal * hv.HLine(y=0)).hist() + fractal.sample(y=0))"
Expand All @@ -41,7 +43,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Even extremely complex relationships between data elements can be expressed succinctly in HoloViews, allowing you to explore them with ease:"
"Even extremely complex relationships between data elements can be expressed succinctly in HoloViews, allowing you to explore them with ease, independent of the plotting backend you choose to display them:"
]
},
{
Expand All @@ -52,10 +54,11 @@
},
"outputs": [],
"source": [
"%%output backend='matplotlib'\n",
"%%opts Points [scaling_factor=50] Contours (color='w')\n",
"dots = np.linspace(-0.45, 0.45, 19)\n",
"\n",
"hv.HoloMap({y: (fractal * fractal.sample([(i,y) for i in dots]).to.points(['x','y'], 'z') +\n",
"hv.HoloMap({y: (fractal * hv.Points(fractal.sample([(i,y) for i in dots])) +\n",
" fractal.sample(y=y) +\n",
" hv.operation.threshold(fractal, level=np.percentile(fractal.sample(y=y).data, 90)) +\n",
" hv.operation.contours(fractal, levels=[np.percentile(fractal.sample(y=y).data, 60)]))\n",
Expand Down
Binary file modified doc/mandelbrot.npy
Binary file not shown.

0 comments on commit 2ac261c

Please sign in to comment.