[Python-modules-commits] [python-mplexporter] 47/135: Merge branch 'ipynb'
Wolfgang Borgert
debacle at moszumanska.debian.org
Tue Sep 23 21:19:02 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository python-mplexporter.
commit c4a141b8321d2a42a31b2b0520c913c6aa531bfe
Merge: 8355843 5aa9d06
Author: theengineear <andseier at gmail.com>
Date: Tue Feb 25 00:11:31 2014 -0800
Merge branch 'ipynb'
Conflicts:
notebooks/PlotlyTest.ipynb
notebooks/PlotlyTest.ipynb | 165 ++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 154 insertions(+), 11 deletions(-)
diff --cc notebooks/PlotlyTest.ipynb
index 3e3c1a0,71ad7f0..32b926e
--- a/notebooks/PlotlyTest.ipynb
+++ b/notebooks/PlotlyTest.ipynb
@@@ -19,7 -36,15 +36,19 @@@
"language": "python",
"metadata": {},
"outputs": [],
++<<<<<<< HEAD
+ "prompt_number": 1
++=======
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 4,
+ "metadata": {},
+ "source": [
+ "You can use the IPython.Demo username for now, or switch this for your own Plotly username and api_key. Don't have a username? You might try finding one at: https://plot.ly/"
+ ]
++>>>>>>> ipynb
},
{
"cell_type": "code",
@@@ -31,7 -56,15 +60,19 @@@
"language": "python",
"metadata": {},
"outputs": [],
++<<<<<<< HEAD
+ "prompt_number": 2
++=======
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 4,
+ "metadata": {},
+ "source": [
+ "Here we instantiate a matplotlib figure object and fill it with stuff we want to plot! IPython's matplotlib magic function will pop it inline after you run the code block."
+ ]
++>>>>>>> ipynb
},
{
"cell_type": "code",
@@@ -57,11 -89,21 +97,29 @@@
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEZCAYAAABrUHmEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcFdXaB/DfRvCOgKiEwAndeBRFETMVfRW0EEQlu6m9\nnaOmmaV5qc57NNC8lL6a1ZuXjpnlpZOV5fHKxcwS9KSItyNeUUgNUFATRVFDYb1/DCCXvdnD3nNZ\nM/N8P5/94bJnzzyz1mIWM7PWMybGGAMhhBAigpPaARBCCNEO6jQIIYSIRp0GIYQQ0ajTIIQQIhp1\nGoQQQkSjToMQQoho1GkQwpG9e/eiQ4cOaodBiFXUaRBD8ff3x88//wwAWLt2Lfr27Vvl/TFjxmDd\nunWyxnDy5EkMHDgQnp6e8PDwQPfu3ZGUlAQA6Nu3L86cOSPr9glxhLPaARCiJJPJ5ND7Uhg6dCgm\nTZqExMRE [...]
"text": [
++<<<<<<< HEAD
+ "<matplotlib.figure.Figure at 0x1062a6710>"
+ ]
+ }
+ ],
+ "prompt_number": 3
++=======
+ "<matplotlib.figure.Figure at 0x10b4413d0>"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 4,
+ "metadata": {},
+ "source": [
+ "Like keeping your data around? Want to share your plots and/or data online? The following line takes the matplotlib figure object, extracts the data with mplexporter, renders a new plot with PlotlyRenderer, and sends it to Plotly. The plot shows up inline because of the 'notebook=True' keyword argument. This causes the fig_to_plotly function to call 'plotly.iplot' (IPython plot) instead of the normal 'plotly.plot' function. Taking that keyword argument out defaults to the normal [...]
+ "\n",
+ "Note how you can zoom, pan, autoscale, and see data points by hovering. The data you plotted is right there. If you want to change the style, layout, etc. on plotly, you can click the link below the plot."
+ ]
++>>>>>>> ipynb
},
{
"cell_type": "code",
@@@ -74,17 -116,65 +132,79 @@@
"outputs": [
{
"html": [
++<<<<<<< HEAD
+ "<iframe height=\"500\" id=\"igraph\" scrolling=\"no\" seamless=\"seamless\" src=\"https://plot.ly/~IPython.Demo/1249/600/450\" width=\"650\"></iframe>"
+ ],
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 4,
+ "text": [
+ "<IPython.core.display.HTML at 0x10629dcd0>"
+ ]
+ }
+ ],
+ "prompt_number": 4
++=======
+ "<iframe height=\"500\" id=\"igraph\" scrolling=\"no\" seamless=\"seamless\" src=\"https://plot.ly/~IPython.Demo/1261/600/450\" width=\"650\"></iframe>"
+ ],
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 31,
+ "text": [
+ "<IPython.core.display.HTML at 0x10b47ea10>"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 4,
+ "metadata": {},
+ "source": [
+ "But why have one axes object when you could have five!? Gridspec is a handy way to partition figure space into nice looking subplots. Here are just some simple line plots stretching over a 3x3 grid of plotting areas."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "fig2 = plt.figure() # matplotlib.figure.Figure obj\n",
+ "gs = gridspec.GridSpec(3, 3)\n",
+ "ax1 = fig2.add_subplot(gs[0,:])\n",
+ "ax1.plot([1,2,3,4,5], [10,5,10,5,10], 'r-')\n",
+ "ax2 = fig2.add_subplot(gs[1,:-1])\n",
+ "ax2.plot([1,2,3,4], [1,4,9,16], 'k-')\n",
+ "ax3 = fig2.add_subplot(gs[1:, 2])\n",
+ "ax3.plot([1,2,3,4], [1,10,100,1000], 'b-')\n",
+ "ax4 = fig2.add_subplot(gs[2,0])\n",
+ "ax4.plot([1,2,3,4], [0,0,1,1], 'g-')\n",
+ "ax5 = fig2.add_subplot(gs[2,1])\n",
+ "ax5.plot([1,2,3,4], [1,0,0,1], 'c-')\n",
+ "gs.update(wspace=0.5, hspace=0.5)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXtc1HX2/18odFELQwUSMJT7iMKYSda6oYgmBrnrpTCV\n1KzN3bx8d7fMfbRqv0L6umVaq13WXLQU+1qrZkppcVuFMEWzSEGFBARK0BTRQOb8/phm5DL3ec9n\nPp+Z83w8eMDMfD7v9+Gc+Zw5cz7nvN8eRERgGIZhXIpuzhaAYRiGEQ87d4ZhGBeEnTvDMIwLws6d\nYRjGBWHnzjAM44Kwc2cYhnFBrHLuc+bMgZ+fH4YMGaJ/rrGxEYmJiQgPD8e4ceNw8eJF4UIyDMMw\n1mGVc589ezays7M7PJeRkYHExESUlZUhISEBGRkZQgVkGIZhrMfD2iamyspKJCcn4/jx4wCAyMhI\n5OXlwc/P [...]
+ "text": [
+ "<matplotlib.figure.Figure at 0x10b1f7290>"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 4,
+ "metadata": {},
+ "source": [
+ "Again, a simple line of code sends the above figure to Plotly and it responds by sticking back into this notebook."
+ ]
++>>>>>>> ipynb
},
{
"cell_type": "code",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-mplexporter.git
More information about the Python-modules-commits
mailing list