Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb1d2c8

Browse files
committed
more py syntax updates
1 parent 901401e commit eb1d2c8

File tree

12 files changed

+587
-620
lines changed

12 files changed

+587
-620
lines changed

_posts/python/3d/iso-surface/2015-06-30-Plotly-isosurfaces.html

Lines changed: 63 additions & 57 deletions
Large diffs are not rendered by default.

_posts/python/3d/iso-surface/Plotly-isosurfaces.ipynb

Lines changed: 23 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"metadata": {
6-
"deletable": true,
7-
"editable": true
8-
},
5+
"metadata": {},
96
"source": [
107
"#### New to Plotly?\n",
118
"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,10 +12,7 @@
1512
},
1613
{
1714
"cell_type": "markdown",
18-
"metadata": {
19-
"deletable": true,
20-
"editable": true
21-
},
15+
"metadata": {},
2216
"source": [
2317
"#### Plotly Isosurfaces Defined as Trisurfs\n",
2418
"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,15 +26,11 @@
3226
{
3327
"cell_type": "code",
3428
"execution_count": 1,
35-
"metadata": {
36-
"collapsed": false,
37-
"deletable": true,
38-
"editable": true
39-
},
29+
"metadata": {},
4030
"outputs": [],
4131
"source": [
4232
"import plotly.plotly as py\n",
43-
"from plotly.graph_objs import *\n",
33+
"import plotly.graph_objs as go\n",
4434
"from plotly.tools import FigureFactory as FF\n",
4535
"\n",
4636
"import numpy as np\n",
@@ -52,22 +42,15 @@
5242
},
5343
{
5444
"cell_type": "markdown",
55-
"metadata": {
56-
"deletable": true,
57-
"editable": true
58-
},
45+
"metadata": {},
5946
"source": [
6047
"#### Triangulate the Given Surface:"
6148
]
6249
},
6350
{
6451
"cell_type": "code",
6552
"execution_count": 2,
66-
"metadata": {
67-
"collapsed": false,
68-
"deletable": true,
69-
"editable": true
70-
},
53+
"metadata": {},
7154
"outputs": [],
7255
"source": [
7356
"vertices, simplices = measure.marching_cubes(surf_eq, 0)\n",
@@ -76,22 +59,15 @@
7659
},
7760
{
7861
"cell_type": "markdown",
79-
"metadata": {
80-
"deletable": true,
81-
"editable": true
82-
},
62+
"metadata": {},
8363
"source": [
8464
"#### Color According to a colormap and Plot:"
8565
]
8666
},
8767
{
8868
"cell_type": "code",
8969
"execution_count": 3,
90-
"metadata": {
91-
"collapsed": false,
92-
"deletable": true,
93-
"editable": true
94-
},
70+
"metadata": {},
9571
"outputs": [
9672
{
9773
"data": {
@@ -121,22 +97,15 @@
12197
},
12298
{
12399
"cell_type": "markdown",
124-
"metadata": {
125-
"deletable": true,
126-
"editable": true
127-
},
100+
"metadata": {},
128101
"source": [
129102
"#### Reference"
130103
]
131104
},
132105
{
133106
"cell_type": "code",
134107
"execution_count": 4,
135-
"metadata": {
136-
"collapsed": false,
137-
"deletable": true,
138-
"editable": true
139-
},
108+
"metadata": {},
140109
"outputs": [
141110
{
142111
"name": "stdout",
@@ -374,12 +343,8 @@
374343
},
375344
{
376345
"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": {},
383348
"outputs": [
384349
{
385350
"data": {
@@ -410,23 +375,14 @@
410375
"output_type": "stream",
411376
"text": [
412377
"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",
414379
"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"
430386
]
431387
}
432388
],
@@ -440,7 +396,7 @@
440396
" \n",
441397
"import publisher\n",
442398
"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",
444400
" 'How to make Iso Surface in Python with Plotly.',\n",
445401
" title = 'Python Iso Surface | plotly',\n",
446402
" name = 'Iso Surface',\n",
@@ -454,9 +410,7 @@
454410
"cell_type": "code",
455411
"execution_count": null,
456412
"metadata": {
457-
"collapsed": true,
458-
"deletable": true,
459-
"editable": true
413+
"collapsed": true
460414
},
461415
"outputs": [],
462416
"source": []
@@ -478,9 +432,9 @@
478432
"name": "python",
479433
"nbconvert_exporter": "python",
480434
"pygments_lexer": "ipython2",
481-
"version": "2.7.12"
435+
"version": "2.7.14"
482436
}
483437
},
484438
"nbformat": 4,
485-
"nbformat_minor": 0
439+
"nbformat_minor": 1
486440
}

0 commit comments

Comments
 (0)