From 5bb71b9297c6879296212ae0cfaecb75e8bbc1c9 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Tue, 4 Apr 2017 13:44:45 +0100 Subject: [PATCH] Added small section on Options inheritance to tutorial --- doc/Tutorials/Options.ipynb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/Tutorials/Options.ipynb b/doc/Tutorials/Options.ipynb index 3935161e62..ae9aea9d4e 100644 --- a/doc/Tutorials/Options.ipynb +++ b/doc/Tutorials/Options.ipynb @@ -641,6 +641,30 @@ { "cell_type": "markdown", "metadata": {}, + "source": [ + "## Option inheritance\n", + "\n", + "Since HoloViews objects nest in a variety of ways and you do not want to keep changing the options specification when you compose your object into an ``Overlay`` or ``NdOverlay``, certain ``plot`` options are inherited. This includes all plot options which control the appearance of the axes, but not those that are specific to the Element. As a simple example let us combine the ``Image`` from above with some ``Bounds``. Even though we apply the ``xrotation`` and ``yticks`` options to the ``Image`` they are inherited by the ``Overlay`` of the ``Image`` and ``Bounds``." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%%opts Image [xrotation=90 yticks=[-0.5, 0., 0.5]]\n", + "image * hv.Bounds((-.25, -.25, .25, .25))" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "deletable": true, + "editable": true + }, "source": [ "## Separating data and visualization options" ]