##// END OF EJS Templates
Added clear_output changes
Added clear_output changes

File last commit:

r9455:89fe4319
r12637:b6c68e95
Show More
Pylab Switching.ipynb
107 lines | 8.3 KiB | text/plain | TextLexer
Ryan May
Add test of switching pylab modes.
r7943 {
"metadata": {
"name": "Pylab Switching"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Should pop up a GUI window\n",
"%pylab qt\n",
"plot([1,2,3])"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"Welcome to pylab, a matplotlib-based Python environment [backend: Qt4Agg].\n",
"For more information, type 'help(pylab)'.\n"
]
},
{
"output_type": "pyout",
"prompt_number": 3,
"text": [
"[<matplotlib.lines.Line2D at 0x4566850>]"
]
}
],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Should make an inline figure\n",
"%pylab inline\n",
"plot([1,2,3])"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
Martin Spacek
`IPython.zmq` --> `IPython.kernel.zmq` throughout docs and examples
r9455 "Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.kernel.zmq.pylab.backend_inline].\n",
Ryan May
Add test of switching pylab modes.
r7943 "For more information, type 'help(pylab)'.\n"
]
},
{
"output_type": "pyout",
"prompt_number": 4,
"text": [
"[<matplotlib.lines.Line2D at 0x4830ad0>]"
]
},
{
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD9CAYAAACoXlzKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAESVJREFUeJzt3V9oVFcCx/HftBHqGKvmwQQmWQqNLRk1mcRCWNA6IlJi\nawhV1sqmDZqHEFatr8WHqhUpKEikIPYlIj5Y0EIDTYQ+OIpKDGK6lPpgLIZMomQNEjDQ4qhnH7Jm\nZ8xk/t6ZuX++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TW1qZ79+4VYXbuxL1pDe7L\n3MzMzGjHjh3q6elReXn5vOPZ3J+WFfvrz7RHo1FVV1enHMNz7wvL5HouXbpUfr9fktTS0qJYLKYn\nT54UdZ5uwb1pHe7L7MViMW3fvl3t7e1qa2ubdzzb+9Oyhf2DDz7QyMiIRkdH9ezZM/3www9qbW1N\nGMNz75nL5HpOTk7O/S0+NDQkY4wqKipKMV3H4960Dvdldowx6uzsVDAY1IEDB5KOyfb+tGwrpqys\nTN99950++ugjvXjxQp2dnaqrq9OZM2ck8dx7tjK5nhcvXtTp06dVVlYmv9+vCxculHjW9sXvZFgn\n3bXkvszOjRs3dP78edXX16uxsVGSdOzYMY2NjUnK7f70Gf75GgBcpeT/13gAAGuxsAOAy7CwA4DL\nsLADgMuwsAOAy7CwA4DL/BdtJN59CWl7cgAAAABJRU5ErkJggg==\n"
}
],
"prompt_number": 4
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# New GUI window--should *NOT* have the visual settings of inline\n",
"%pylab qt\n",
"plot([1,2,3])"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"Welcome to pylab, a matplotlib-based Python environment [backend: Qt4Agg].\n",
"For more information, type 'help(pylab)'.\n"
]
},
{
"output_type": "pyout",
"prompt_number": 11,
"text": [
"[<matplotlib.lines.Line2D at 0x5253850>]"
]
}
],
"prompt_number": 11
}
],
"metadata": {}
}
]
}