{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "{-# LANGUAGE TypeOperators #-}\n", "import Data.Manifold.TreeCover\n", "import Data.Manifold.Types" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "From [dynamic-plot](http://hackage.haskell.org/package/dynamic-plot):" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import Graphics.Dynamic.Plot.R2" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "GraphWindowSpecR2{lBound=-1.6666666666666754, rBound=11.66666666666673, bBound=-0.33333333333333326, tBound=2.3333333333333335, xResolution=640, yResolution=480}" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "tf :: ℝ`Shaded`ℝ\n", "tf = spanShading (\\_ -> 1:±[1]) $ fromLeafPoints [0, 0.1 .. 10]\n", "\n", "plotWindow [plot tf, plot [completeTopShading tfl | ((_,tfl),_)<-twigsWithEnvirons tf] ]" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Haskell", "language": "haskell", "name": "haskell" }, "language_info": { "codemirror_mode": "ihaskell", "file_extension": ".hs", "name": "haskell", "version": "7.10.2" } }, "nbformat": 4, "nbformat_minor": 0 }