Skip to content

Commit afe6575

Browse files
update dash colorscales
1 parent ddadbd1 commit afe6575

File tree

2 files changed

+60
-54
lines changed

2 files changed

+60
-54
lines changed

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

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -440,17 +440,17 @@ <h3 id="Custom-Colorbar">Custom Colorbar<a class="anchor-link" href="#Custom-Col
440440
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
441441
</div><div class="inner_cell">
442442
<div class="text_cell_render border-box-sizing rendered_html">
443-
<h3 id="Reference">Reference<a class="anchor-link" href="#Reference">&#182;</a></h3>
443+
<h3 id="Dash-Example">Dash Example<a class="anchor-link" href="#Dash-Example">&#182;</a></h3>
444444
</div>
445445
</div>
446446
</div>
447447
<div class="cell border-box-sizing code_cell rendered">
448448
<div class="input">
449-
<div class="prompt input_prompt">In&nbsp;[1]:</div>
449+
<div class="prompt input_prompt">In&nbsp;[4]:</div>
450450
<div class="inner_cell">
451451
<div class="input_area">
452-
<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>
453-
<span class="n">HTML</span><span class="p">(</span><span class="s1">&#39;&lt;iframe src= &quot;https://dash-simple-apps.plotly.host/dash-colorscaleplot/&quot; width=&quot;100%&quot; height=&quot;650px&quot; frameBorder=&quot;0&quot;&gt;&lt;/iframe&gt;&#39;</span><span class="p">)</span>
452+
<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>
453+
<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-colorscaleplot/&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>
454454
</pre></div>
455455

456456
</div>
@@ -463,31 +463,42 @@ <h3 id="Reference">Reference<a class="anchor-link" href="#Reference">&#182;</a><
463463

464464
<div class="output_area">
465465

466-
<div class="prompt"></div>
466+
<div class="prompt output_prompt">Out[4]:</div>
467467

468468

469-
<div class="output_subarea output_stream output_stderr output_text">
470-
<pre>/usr/local/lib/python3.7/site-packages/IPython/core/display.py:689: UserWarning: Consider using IPython.display.IFrame instead
471-
warnings.warn(&#34;Consider using IPython.display.IFrame instead&#34;)
472-
</pre>
473-
</div>
474-
</div>
475469

476-
<div class="output_area">
477-
478-
<div class="prompt output_prompt">Out[1]:</div>
470+
<div class="output_html rendered_html output_subarea output_execute_result">
479471

472+
<iframe
473+
width="100%"
474+
height="650px"
475+
src="https://dash-simple-apps.plotly.host/dash-colorscaleplot/?frameBorder=0"
476+
frameborder="0"
477+
allowfullscreen
478+
></iframe>
479+
480+
</div>
480481

482+
</div>
481483

482-
<div class="output_html rendered_html output_subarea output_execute_result">
483-
<iframe src= "https://dash-simple-apps.plotly.host/dash-colorscaleplot/" width="100%" height="650px" frameBorder="0"></iframe>
484+
</div>
484485
</div>
485486

486487
</div>
488+
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
489+
</div><div class="inner_cell">
490+
<div class="text_cell_render border-box-sizing rendered_html">
491+
<p><a href="https://github.com/plotly/simple-example-chart-apps/tree/master/colorscale">source code</a></p>
487492

488493
</div>
489494
</div>
490-
495+
</div>
496+
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
497+
</div><div class="inner_cell">
498+
<div class="text_cell_render border-box-sizing rendered_html">
499+
<h3 id="Reference">Reference<a class="anchor-link" href="#Reference">&#182;</a></h3>
500+
</div>
501+
</div>
491502
</div>
492503
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
493504
</div><div class="inner_cell">

_posts/python/style/colorscales/colorscales.ipynb

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -360,39 +360,53 @@
360360
"cell_type": "markdown",
361361
"metadata": {},
362362
"source": [
363-
"### Reference"
363+
"### Dash Example"
364364
]
365365
},
366366
{
367367
"cell_type": "code",
368-
"execution_count": 1,
368+
"execution_count": 4,
369369
"metadata": {},
370370
"outputs": [
371-
{
372-
"name": "stderr",
373-
"output_type": "stream",
374-
"text": [
375-
"/usr/local/lib/python3.7/site-packages/IPython/core/display.py:689: UserWarning: Consider using IPython.display.IFrame instead\n",
376-
" warnings.warn(\"Consider using IPython.display.IFrame instead\")\n"
377-
]
378-
},
379371
{
380372
"data": {
381373
"text/html": [
382-
"<iframe src= \"https://dash-simple-apps.plotly.host/dash-colorscaleplot/\" width=\"100%\" height=\"650px\" frameBorder=\"0\"></iframe>"
374+
"\n",
375+
" <iframe\n",
376+
" width=\"100%\"\n",
377+
" height=\"650px\"\n",
378+
" src=\"https://dash-simple-apps.plotly.host/dash-colorscaleplot/?frameBorder=0\"\n",
379+
" frameborder=\"0\"\n",
380+
" allowfullscreen\n",
381+
" ></iframe>\n",
382+
" "
383383
],
384384
"text/plain": [
385-
"<IPython.core.display.HTML object>"
385+
"<IPython.lib.display.IFrame at 0x106426128>"
386386
]
387387
},
388-
"execution_count": 1,
388+
"execution_count": 4,
389389
"metadata": {},
390390
"output_type": "execute_result"
391391
}
392392
],
393393
"source": [
394-
"from IPython.display import HTML\n",
395-
"HTML('<iframe src= \"https://dash-simple-apps.plotly.host/dash-colorscaleplot/\" width=\"100%\" height=\"650px\" frameBorder=\"0\"></iframe>')"
394+
"from IPython.display import IFrame\n",
395+
"IFrame(src= \"https://dash-simple-apps.plotly.host/dash-colorscaleplot/\" ,width=\"100%\" ,height=\"650px\", frameBorder=\"0\")"
396+
]
397+
},
398+
{
399+
"cell_type": "markdown",
400+
"metadata": {},
401+
"source": [
402+
"[source code](https://github.com/plotly/simple-example-chart-apps/tree/master/colorscale)"
403+
]
404+
},
405+
{
406+
"cell_type": "markdown",
407+
"metadata": {},
408+
"source": [
409+
"### Reference"
396410
]
397411
},
398412
{
@@ -404,7 +418,7 @@
404418
},
405419
{
406420
"cell_type": "code",
407-
"execution_count": 2,
421+
"execution_count": 6,
408422
"metadata": {},
409423
"outputs": [
410424
{
@@ -436,27 +450,17 @@
436450
"output_type": "stream",
437451
"text": [
438452
"Collecting git+https://github.com/plotly/publisher.git\n",
439-
" Cloning https://github.com/plotly/publisher.git to /private/var/folders/s5/vjqn03zs7nn8zs_fwzcf14r40000gn/T/pip-req-build-mf6h8_9u\n",
453+
" Cloning https://github.com/plotly/publisher.git to /private/var/folders/s5/vjqn03zs7nn8zs_fwzcf14r40000gn/T/pip-req-build-refmjbml\n",
440454
"Building wheels for collected packages: publisher\n",
441455
" Building wheel for publisher (setup.py) ... \u001b[?25ldone\n",
442-
"\u001b[?25h Stored in directory: /private/var/folders/s5/vjqn03zs7nn8zs_fwzcf14r40000gn/T/pip-ephem-wheel-cache-guvpyq87/wheels/99/3e/a0/fbd22ba24cca72bdbaba53dbc23c1768755fb17b3af0f33966\n",
456+
"\u001b[?25h Stored in directory: /private/var/folders/s5/vjqn03zs7nn8zs_fwzcf14r40000gn/T/pip-ephem-wheel-cache-yj6cqbja/wheels/99/3e/a0/fbd22ba24cca72bdbaba53dbc23c1768755fb17b3af0f33966\n",
443457
"Successfully built publisher\n",
444458
"Installing collected packages: publisher\n",
445459
" Found existing installation: publisher 0.13\n",
446460
" Uninstalling publisher-0.13:\n",
447461
" Successfully uninstalled publisher-0.13\n",
448462
"Successfully installed publisher-0.13\n"
449463
]
450-
},
451-
{
452-
"name": "stderr",
453-
"output_type": "stream",
454-
"text": [
455-
"/usr/local/lib/python3.7/site-packages/IPython/nbconvert.py:13: ShimWarning: The `IPython.nbconvert` package has been deprecated since IPython 4.0. You should import from nbconvert instead.\n",
456-
" \"You should import from nbconvert instead.\", ShimWarning)\n",
457-
"/usr/local/lib/python3.7/site-packages/publisher/publisher.py:53: UserWarning: Did you \"Save\" this notebook before running this command? Remember to save, always save.\n",
458-
" warnings.warn('Did you \"Save\" this notebook before running this command? '\n"
459-
]
460464
}
461465
],
462466
"source": [
@@ -478,15 +482,6 @@
478482
" order=11,\n",
479483
" ipynb= '~notebook_demo/187')"
480484
]
481-
},
482-
{
483-
"cell_type": "code",
484-
"execution_count": null,
485-
"metadata": {
486-
"collapsed": true
487-
},
488-
"outputs": [],
489-
"source": []
490485
}
491486
],
492487
"metadata": {

0 commit comments

Comments
 (0)