|
2 | 2 | "cells": [
|
3 | 3 | {
|
4 | 4 | "cell_type": "markdown",
|
5 |
| - "metadata": { |
6 |
| - "deletable": true, |
7 |
| - "editable": true |
8 |
| - }, |
| 5 | + "metadata": {}, |
9 | 6 | "source": [
|
10 | 7 | "#### New to Plotly?\n",
|
11 | 8 | "Plotly's Python library is free and open source! [Get started](https://plot.ly/python/getting-started/) by downloading the client and [reading the primer](https://plot.ly/python/getting-started/).\n",
|
|
15 | 12 | },
|
16 | 13 | {
|
17 | 14 | "cell_type": "markdown",
|
18 |
| - "metadata": { |
19 |
| - "deletable": true, |
20 |
| - "editable": true |
21 |
| - }, |
| 15 | + "metadata": {}, |
22 | 16 | "source": [
|
23 | 17 | "#### Plotly Isosurfaces Defined as Trisurfs\n",
|
24 | 18 | "A surface, `F(x,y,z) = c` is discretized by a triangular mesh, extracted by the [Marching cubes algorithm](http://scikit-image.org/docs/dev/auto_examples/edges/plot_marching_cubes.html) from a volume given as a \n",
|
|
32 | 26 | {
|
33 | 27 | "cell_type": "code",
|
34 | 28 | "execution_count": 1,
|
35 |
| - "metadata": { |
36 |
| - "collapsed": false, |
37 |
| - "deletable": true, |
38 |
| - "editable": true |
39 |
| - }, |
| 29 | + "metadata": {}, |
40 | 30 | "outputs": [],
|
41 | 31 | "source": [
|
42 | 32 | "import plotly.plotly as py\n",
|
43 |
| - "from plotly.graph_objs import *\n", |
| 33 | + "import plotly.graph_objs as go\n", |
44 | 34 | "from plotly.tools import FigureFactory as FF\n",
|
45 | 35 | "\n",
|
46 | 36 | "import numpy as np\n",
|
|
52 | 42 | },
|
53 | 43 | {
|
54 | 44 | "cell_type": "markdown",
|
55 |
| - "metadata": { |
56 |
| - "deletable": true, |
57 |
| - "editable": true |
58 |
| - }, |
| 45 | + "metadata": {}, |
59 | 46 | "source": [
|
60 | 47 | "#### Triangulate the Given Surface:"
|
61 | 48 | ]
|
62 | 49 | },
|
63 | 50 | {
|
64 | 51 | "cell_type": "code",
|
65 | 52 | "execution_count": 2,
|
66 |
| - "metadata": { |
67 |
| - "collapsed": false, |
68 |
| - "deletable": true, |
69 |
| - "editable": true |
70 |
| - }, |
| 53 | + "metadata": {}, |
71 | 54 | "outputs": [],
|
72 | 55 | "source": [
|
73 | 56 | "vertices, simplices = measure.marching_cubes(surf_eq, 0)\n",
|
|
76 | 59 | },
|
77 | 60 | {
|
78 | 61 | "cell_type": "markdown",
|
79 |
| - "metadata": { |
80 |
| - "deletable": true, |
81 |
| - "editable": true |
82 |
| - }, |
| 62 | + "metadata": {}, |
83 | 63 | "source": [
|
84 | 64 | "#### Color According to a colormap and Plot:"
|
85 | 65 | ]
|
86 | 66 | },
|
87 | 67 | {
|
88 | 68 | "cell_type": "code",
|
89 | 69 | "execution_count": 3,
|
90 |
| - "metadata": { |
91 |
| - "collapsed": false, |
92 |
| - "deletable": true, |
93 |
| - "editable": true |
94 |
| - }, |
| 70 | + "metadata": {}, |
95 | 71 | "outputs": [
|
96 | 72 | {
|
97 | 73 | "data": {
|
|
121 | 97 | },
|
122 | 98 | {
|
123 | 99 | "cell_type": "markdown",
|
124 |
| - "metadata": { |
125 |
| - "deletable": true, |
126 |
| - "editable": true |
127 |
| - }, |
| 100 | + "metadata": {}, |
128 | 101 | "source": [
|
129 | 102 | "#### Reference"
|
130 | 103 | ]
|
131 | 104 | },
|
132 | 105 | {
|
133 | 106 | "cell_type": "code",
|
134 | 107 | "execution_count": 4,
|
135 |
| - "metadata": { |
136 |
| - "collapsed": false, |
137 |
| - "deletable": true, |
138 |
| - "editable": true |
139 |
| - }, |
| 108 | + "metadata": {}, |
140 | 109 | "outputs": [
|
141 | 110 | {
|
142 | 111 | "name": "stdout",
|
|
374 | 343 | },
|
375 | 344 | {
|
376 | 345 | "cell_type": "code",
|
377 |
| - "execution_count": 1, |
378 |
| - "metadata": { |
379 |
| - "collapsed": false, |
380 |
| - "deletable": true, |
381 |
| - "editable": true |
382 |
| - }, |
| 346 | + "execution_count": 3, |
| 347 | + "metadata": {}, |
383 | 348 | "outputs": [
|
384 | 349 | {
|
385 | 350 | "data": {
|
|
410 | 375 | "output_type": "stream",
|
411 | 376 | "text": [
|
412 | 377 | "Collecting git+https://github.com/plotly/publisher.git\n",
|
413 |
| - " Cloning https://github.com/plotly/publisher.git to /var/folders/ld/6cl3s_l50wd40tdjq2b03jxh0000gp/T/pip-yRWuxs-build\n", |
| 378 | + " Cloning https://github.com/plotly/publisher.git to c:\\users\\brand\\appdata\\local\\temp\\pip-req-build-sa6pjxat\n", |
414 | 379 | "Installing collected packages: publisher\n",
|
415 |
| - " Found existing installation: publisher 0.10\n", |
416 |
| - " Uninstalling publisher-0.10:\n", |
417 |
| - " Successfully uninstalled publisher-0.10\n", |
418 |
| - " Running setup.py install for publisher ... \u001b[?25l-\b \b\\\b \bdone\n", |
419 |
| - "\u001b[?25hSuccessfully installed publisher-0.10\n" |
420 |
| - ] |
421 |
| - }, |
422 |
| - { |
423 |
| - "name": "stderr", |
424 |
| - "output_type": "stream", |
425 |
| - "text": [ |
426 |
| - "/Users/brandendunbar/Desktop/test/venv/lib/python2.7/site-packages/IPython/nbconvert.py:13: ShimWarning: The `IPython.nbconvert` package has been deprecated. You should import from nbconvert instead.\n", |
427 |
| - " \"You should import from nbconvert instead.\", ShimWarning)\n", |
428 |
| - "/Users/brandendunbar/Desktop/test/venv/lib/python2.7/site-packages/publisher/publisher.py:53: UserWarning: Did you \"Save\" this notebook before running this command? Remember to save, always save.\n", |
429 |
| - " warnings.warn('Did you \"Save\" this notebook before running this command? '\n" |
| 380 | + " Found existing installation: publisher 0.11\n", |
| 381 | + " Uninstalling publisher-0.11:\n", |
| 382 | + " Successfully uninstalled publisher-0.11\n", |
| 383 | + " Running setup.py install for publisher: started\n", |
| 384 | + " Running setup.py install for publisher: finished with status 'done'\n", |
| 385 | + "Successfully installed publisher-0.11\n" |
430 | 386 | ]
|
431 | 387 | }
|
432 | 388 | ],
|
|
440 | 396 | " \n",
|
441 | 397 | "import publisher\n",
|
442 | 398 | "publisher.publish(\n",
|
443 |
| - " 'Plotly-isosurfaces.ipynb', 'python/isosurfaces-with-marching-cubes/', 'Iso Surface | plotly',\n", |
| 399 | + " 'Plotly-isosurfaces.ipynb', 'python/isosurfaces-with-marching-cubes/', 'Iso Surface',\n", |
444 | 400 | " 'How to make Iso Surface in Python with Plotly.',\n",
|
445 | 401 | " title = 'Python Iso Surface | plotly',\n",
|
446 | 402 | " name = 'Iso Surface',\n",
|
|
454 | 410 | "cell_type": "code",
|
455 | 411 | "execution_count": null,
|
456 | 412 | "metadata": {
|
457 |
| - "collapsed": true, |
458 |
| - "deletable": true, |
459 |
| - "editable": true |
| 413 | + "collapsed": true |
460 | 414 | },
|
461 | 415 | "outputs": [],
|
462 | 416 | "source": []
|
|
478 | 432 | "name": "python",
|
479 | 433 | "nbconvert_exporter": "python",
|
480 | 434 | "pygments_lexer": "ipython2",
|
481 |
| - "version": "2.7.12" |
| 435 | + "version": "2.7.14" |
482 | 436 | }
|
483 | 437 | },
|
484 | 438 | "nbformat": 4,
|
485 |
| - "nbformat_minor": 0 |
| 439 | + "nbformat_minor": 1 |
486 | 440 | }
|
0 commit comments