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

Skip to content

Commit 55a5e83

Browse files
add dash shapes
1 parent 23cf3b9 commit 55a5e83

File tree

2 files changed

+58
-33
lines changed

2 files changed

+58
-33
lines changed

_posts/python/style/shapes/2015-06-30-shapes.html

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,14 +1038,21 @@ <h4 id="SVG-Paths">SVG Paths<a class="anchor-link" href="#SVG-Paths">&#182;</a><
10381038
</div>
10391039
</div>
10401040

1041+
</div>
1042+
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
1043+
</div><div class="inner_cell">
1044+
<div class="text_cell_render border-box-sizing rendered_html">
1045+
<h3 id="Dash-Example">Dash Example<a class="anchor-link" href="#Dash-Example">&#182;</a></h3>
1046+
</div>
1047+
</div>
10411048
</div>
10421049
<div class="cell border-box-sizing code_cell rendered">
10431050
<div class="input">
1044-
<div class="prompt input_prompt">In&nbsp;[2]:</div>
1051+
<div class="prompt input_prompt">In&nbsp;[1]:</div>
10451052
<div class="inner_cell">
10461053
<div class="input_area">
1047-
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">from</span> <span class="nn">IPython.display</span> <span class="k">import</span> <span class="n">HTML</span>
1048-
<span class="n">HTML</span><span class="p">(</span><span class="s1">&#39;&lt;iframe src= &quot;https://dash-simple-apps.plotly.host/dash-shapesplot/&quot; width=&quot;100%&quot; height=&quot;650px&quot; frameBorder=&quot;0&quot;&gt;&lt;/iframe&gt;&#39;</span><span class="p">)</span>
1054+
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">from</span> <span class="nn">IPython.display</span> <span class="k">import</span> <span class="n">IFrame</span>
1055+
<span class="n">IFrame</span><span class="p">(</span><span class="n">src</span><span class="o">=</span> <span class="s2">&quot;https://dash-simple-apps.plotly.host/dash-shapesplot/&quot;</span><span class="p">,</span> <span class="n">width</span><span class="o">=</span><span class="s2">&quot;100%&quot;</span><span class="p">,</span> <span class="n">height</span><span class="o">=</span><span class="s2">&quot;650px&quot;</span><span class="p">,</span> <span class="n">frameBorder</span><span class="o">=</span><span class="s2">&quot;0&quot;</span><span class="p">)</span>
10491056
</pre></div>
10501057

10511058
</div>
@@ -1058,31 +1065,35 @@ <h4 id="SVG-Paths">SVG Paths<a class="anchor-link" href="#SVG-Paths">&#182;</a><
10581065

10591066
<div class="output_area">
10601067

1061-
<div class="prompt"></div>
1068+
<div class="prompt output_prompt">Out[1]:</div>
10621069

10631070

1064-
<div class="output_subarea output_stream output_stderr output_text">
1065-
<pre>/usr/local/lib/python3.7/site-packages/IPython/core/display.py:689: UserWarning: Consider using IPython.display.IFrame instead
1066-
warnings.warn(&#34;Consider using IPython.display.IFrame instead&#34;)
1067-
</pre>
1068-
</div>
1069-
</div>
10701071

1071-
<div class="output_area">
1072-
1073-
<div class="prompt output_prompt">Out[2]:</div>
1072+
<div class="output_html rendered_html output_subarea output_execute_result">
10741073

1074+
<iframe
1075+
width="100%"
1076+
height="650px"
1077+
src="https://dash-simple-apps.plotly.host/dash-shapesplot/?frameBorder=0"
1078+
frameborder="0"
1079+
allowfullscreen
1080+
></iframe>
1081+
1082+
</div>
10751083

1084+
</div>
10761085

1077-
<div class="output_html rendered_html output_subarea output_execute_result">
1078-
<iframe src= "https://dash-simple-apps.plotly.host/dash-shapesplot/" width="100%" height="650px" frameBorder="0"></iframe>
1086+
</div>
10791087
</div>
10801088

10811089
</div>
1090+
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
1091+
</div><div class="inner_cell">
1092+
<div class="text_cell_render border-box-sizing rendered_html">
1093+
<p><a href="https://github.com/plotly/simple-example-chart-apps/tree/master/shapes">source code</a></p>
10821094

10831095
</div>
10841096
</div>
1085-
10861097
</div>
10871098
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
10881099
</div><div class="inner_cell">

_posts/python/style/shapes/shapes.ipynb

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -934,36 +934,50 @@
934934
"py.iplot(fig, filename='shapes-path')"
935935
]
936936
},
937+
{
938+
"cell_type": "markdown",
939+
"metadata": {},
940+
"source": [
941+
"### Dash Example"
942+
]
943+
},
937944
{
938945
"cell_type": "code",
939-
"execution_count": 2,
946+
"execution_count": 1,
940947
"metadata": {},
941948
"outputs": [
942-
{
943-
"name": "stderr",
944-
"output_type": "stream",
945-
"text": [
946-
"/usr/local/lib/python3.7/site-packages/IPython/core/display.py:689: UserWarning: Consider using IPython.display.IFrame instead\n",
947-
" warnings.warn(\"Consider using IPython.display.IFrame instead\")\n"
948-
]
949-
},
950949
{
951950
"data": {
952951
"text/html": [
953-
"<iframe src= \"https://dash-simple-apps.plotly.host/dash-shapesplot/\" width=\"100%\" height=\"650px\" frameBorder=\"0\"></iframe>"
952+
"\n",
953+
" <iframe\n",
954+
" width=\"100%\"\n",
955+
" height=\"650px\"\n",
956+
" src=\"https://dash-simple-apps.plotly.host/dash-shapesplot/?frameBorder=0\"\n",
957+
" frameborder=\"0\"\n",
958+
" allowfullscreen\n",
959+
" ></iframe>\n",
960+
" "
954961
],
955962
"text/plain": [
956-
"<IPython.core.display.HTML object>"
963+
"<IPython.lib.display.IFrame at 0x103151c50>"
957964
]
958965
},
959-
"execution_count": 2,
966+
"execution_count": 1,
960967
"metadata": {},
961968
"output_type": "execute_result"
962969
}
963970
],
964971
"source": [
965-
"from IPython.display import HTML\n",
966-
"HTML('<iframe src= \"https://dash-simple-apps.plotly.host/dash-shapesplot/\" width=\"100%\" height=\"650px\" frameBorder=\"0\"></iframe>')\n"
972+
"from IPython.display import IFrame\n",
973+
"IFrame(src= \"https://dash-simple-apps.plotly.host/dash-shapesplot/\", width=\"100%\", height=\"650px\", frameBorder=\"0\")\n"
974+
]
975+
},
976+
{
977+
"cell_type": "markdown",
978+
"metadata": {},
979+
"source": [
980+
"[source code](https://github.com/plotly/simple-example-chart-apps/tree/master/shapes)"
967981
]
968982
},
969983
{
@@ -976,7 +990,7 @@
976990
},
977991
{
978992
"cell_type": "code",
979-
"execution_count": 4,
993+
"execution_count": 3,
980994
"metadata": {},
981995
"outputs": [
982996
{
@@ -1008,10 +1022,10 @@
10081022
"output_type": "stream",
10091023
"text": [
10101024
"Collecting git+https://github.com/plotly/publisher.git\n",
1011-
" Cloning https://github.com/plotly/publisher.git to /private/var/folders/s5/vjqn03zs7nn8zs_fwzcf14r40000gn/T/pip-req-build-h5der2sk\n",
1025+
" Cloning https://github.com/plotly/publisher.git to /private/var/folders/s5/vjqn03zs7nn8zs_fwzcf14r40000gn/T/pip-req-build-3nu6iqt_\n",
10121026
"Building wheels for collected packages: publisher\n",
10131027
" Building wheel for publisher (setup.py) ... \u001b[?25ldone\n",
1014-
"\u001b[?25h Stored in directory: /private/var/folders/s5/vjqn03zs7nn8zs_fwzcf14r40000gn/T/pip-ephem-wheel-cache-83xx_z8o/wheels/99/3e/a0/fbd22ba24cca72bdbaba53dbc23c1768755fb17b3af0f33966\n",
1028+
"\u001b[?25h Stored in directory: /private/var/folders/s5/vjqn03zs7nn8zs_fwzcf14r40000gn/T/pip-ephem-wheel-cache-vlkyze7_/wheels/99/3e/a0/fbd22ba24cca72bdbaba53dbc23c1768755fb17b3af0f33966\n",
10151029
"Successfully built publisher\n",
10161030
"Installing collected packages: publisher\n",
10171031
" Found existing installation: publisher 0.13\n",

0 commit comments

Comments
 (0)