Advertisement
pleabargain

loading remote python and matplotlib with ipython3

Jun 3rd, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.93 KB | None | 0 0
  1. {
  2.  "metadata": {
  3.   "name": "loading remote python and matplotlib"
  4.  },
  5.  "nbformat": 3,
  6.  "nbformat_minor": 0,
  7.  "worksheets": [
  8.   {
  9.    "cells": [
  10.     {
  11.      "cell_type": "raw",
  12.      "metadata": {},
  13.      "source": "Started here:\nhttp://ipython.org/ipython-doc/dev/interactive/qtconsole.html\n\nto get this to work on Linux Mint 13 you will need to run:\n\nsudo apt-get install libpng-dev\n\nDownload matplotlib and unzip\nread the INSTALL file\n\nthen \n\ncd to the matplotlib directory\n  \npython3.2 setup.py build\n\nand then\n\nsudo python3.2 setup.py install\n\n\n"
  14.     },
  15.     {
  16.      "cell_type": "code",
  17.      "collapsed": false,
  18.      "input": "",
  19.      "language": "python",
  20.      "metadata": {},
  21.      "outputs": []
  22.     },
  23.     {
  24.      "cell_type": "code",
  25.      "collapsed": false,
  26.      "input": "%load http://matplotlib.sourceforge.net/plot_directive/mpl_examples/mplot3d/contour3d_demo.py",
  27.      "language": "python",
  28.      "metadata": {},
  29.      "outputs": [],
  30.      "prompt_number": 4
  31.     },
  32.     {
  33.      "cell_type": "code",
  34.      "collapsed": false,
  35.      "input": "from mpl_toolkits.mplot3d import axes3d\nimport matplotlib.pyplot as plt\n\nfig = plt.figure()\nax = fig.add_subplot(111, projection='3d')#changing this to 100 broke it\nX, Y, Z = axes3d.get_test_data(0.05)\ncset = ax.contour(X, Y, Z)\nax.clabel(cset, fontsize=9, inline=1)\n\nplt.show()\n\n",
  36.      "language": "python",
  37.      "metadata": {},
  38.      "outputs": [],
  39.      "prompt_number": 9
  40.     },
  41.     {
  42.      "cell_type": "code",
  43.      "collapsed": false,
  44.      "input": "from mpl_toolkits.mplot3d import axes3d\nimport matplotlib.pyplot as plt\n\nfig = plt.figure()\nax = fig.add_subplot(111, projection='3d')\nX, Y, Z = axes3d.get_test_data(0.05)\ncset = ax.contour(X, Y, Z)\nax.clabel(cset, fontsize=12, inline=1)\n\nplt.show()\n\n",
  45.      "language": "python",
  46.      "metadata": {},
  47.      "outputs": [],
  48.      "prompt_number": 10
  49.     }
  50.    ],
  51.    "metadata": {}
  52.   }
  53.  ]
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement