{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import math\n", "import numpy\n", "import toyplot" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": true }, "outputs": [], "source": [ "x = numpy.arange(0, 10, 0.1)\n", "y1 = [math.sin(x) for x in x]\n", "y2 = [math.cos(x) for x in x]\n", "y3 = [v1 + v2 for v1, v2 in zip(y1, y2)]" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" }, { "data": { "text/html": [ "
0510-101
    \n", "
  • \n", "
  • \n", " Save as .csv\n", "
  • \n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "canvas = toyplot.Canvas(width=600, height=300)\n", "axes = canvas.cartesian()\n", "axes.plot(x, y1)\n", "axes.plot(x, y2)\n", "axes.plot(x, y3)" ] } ], "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.2" } }, "nbformat": 4, "nbformat_minor": 1 }