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

Skip to content

Commit c9f02e9

Browse files
committed
edited publisher cell + reference cell
1 parent eda41f3 commit c9f02e9

File tree

2 files changed

+51
-65
lines changed

2 files changed

+51
-65
lines changed
Lines changed: 28 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
permalink: python/ribbon-plots/
3-
description: How to make ribbon plots in Python.
4-
title: Python Ribbon Plots | plotly
3+
description: How to make ribbon plots in Python.
4+
name: Python Ribbon Plots | plotly
55
has_thumbnail: true
6-
thumbnail: thumbnail/ribbon-plot.jpg
6+
thumbnail: /images/ribbon-plot.png
77
layout: user-guide
88
name: Ribbon Plots
99
language: python
10+
title: Python Ribbon Plots | plotly
1011
display_as: 3d_charts
1112
has_thumbnail: true
1213
page_type: example_index
@@ -18,52 +19,13 @@
1819
</div>
1920
<div class="inner_cell">
2021
<div class="text_cell_render border-box-sizing rendered_html">
21-
<h1 id="Ribbon-Plots-in-Python">Ribbon Plots in Python<a class="anchor-link" href="#Ribbon-Plots-in-Python">&#182;</a></h1>
22+
<h4 id="Basic-Ribbon-Plot">Basic Ribbon Plot<a class="anchor-link" href="#Basic-Ribbon-Plot">&#182;</a></h4>
2223
</div>
2324
</div>
2425
</div>
2526
<div class="cell border-box-sizing code_cell rendered">
2627
<div class="input">
2728
<div class="prompt input_prompt">In&nbsp;[1]:</div>
28-
<div class="inner_cell">
29-
<div class="input_area">
30-
<div class=" highlight hl-ipython2"><pre><span class="kn">import</span> <span class="nn">plotly</span>
31-
<span class="n">plotly</span><span class="o">.</span><span class="n">__version__</span>
32-
</pre></div>
33-
34-
</div>
35-
</div>
36-
</div>
37-
38-
<div class="output_wrapper">
39-
<div class="output">
40-
41-
42-
<div class="output_area"><div class="prompt output_prompt">Out[1]:</div>
43-
44-
45-
<div class="output_text output_subarea output_execute_result">
46-
<pre>&apos;1.8.8&apos;</pre>
47-
</div>
48-
49-
</div>
50-
51-
</div>
52-
</div>
53-
54-
</div>
55-
<div class="cell border-box-sizing text_cell rendered">
56-
<div class="prompt input_prompt">
57-
</div>
58-
<div class="inner_cell">
59-
<div class="text_cell_render border-box-sizing rendered_html">
60-
<h5 id="Ribbon-Plot">Ribbon Plot<a class="anchor-link" href="#Ribbon-Plot">&#182;</a></h5>
61-
</div>
62-
</div>
63-
</div>
64-
<div class="cell border-box-sizing code_cell rendered">
65-
<div class="input">
66-
<div class="prompt input_prompt">In&nbsp;[2]:</div>
6729
<div class="inner_cell">
6830
<div class="input_area">
6931
<div class=" highlight hl-ipython2"><pre><span class="kn">import</span> <span class="nn">plotly.plotly</span> <span class="kn">as</span> <span class="nn">py</span>
@@ -78,7 +40,7 @@ <h5 id="Ribbon-Plot">Ribbon Plot<a class="anchor-link" href="#Ribbon-Plot">&#182
7840

7941
<span class="n">traces</span> <span class="o">=</span> <span class="p">[]</span>
8042
<span class="n">y_raw</span> <span class="o">=</span> <span class="n">spectra</span><span class="p">[:,</span> <span class="mi">0</span><span class="p">]</span> <span class="c"># wavelength</span>
81-
<span class="n">sample_size</span> <span class="o">=</span> <span class="n">spectra</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">-</span><span class="mi">1</span>
43+
<span class="n">sample_size</span> <span class="o">=</span> <span class="n">spectra</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">-</span><span class="mi">1</span>
8244
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">sample_size</span><span class="p">):</span>
8345
<span class="n">z_raw</span> <span class="o">=</span> <span class="n">spectra</span><span class="p">[:,</span> <span class="n">i</span><span class="p">]</span>
8446
<span class="n">x</span> <span class="o">=</span> <span class="p">[]</span>
@@ -110,15 +72,34 @@ <h5 id="Ribbon-Plot">Ribbon Plot<a class="anchor-link" href="#Ribbon-Plot">&#182
11072
<div class="output">
11173

11274

113-
<div class="output_area"><div class="prompt output_prompt">Out[2]:</div>
75+
<div class="output_area"><div class="prompt output_prompt">Out[1]:</div>
11476

11577
<div class="output_html rendered_html output_subarea output_execute_result">
116-
<iframe id="igraph" scrolling="no" style="border:none;"seamless="seamless" src="https://plot.ly/~chelsea_lyn/8748.embed" height="525px" width="100%"></iframe>
78+
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~demo_account/28.embed" height="525px" width="100%"></iframe>
79+
</div>
80+
11781
</div>
11882

83+
</div>
11984
</div>
12085

12186
</div>
87+
<div class="cell border-box-sizing text_cell rendered">
88+
<div class="prompt input_prompt">
89+
</div>
90+
<div class="inner_cell">
91+
<div class="text_cell_render border-box-sizing rendered_html">
92+
<h4 id="Reference">Reference<a class="anchor-link" href="#Reference">&#182;</a></h4>
12293
</div>
94+
</div>
95+
</div>
96+
<div class="cell border-box-sizing text_cell rendered">
97+
<div class="prompt input_prompt">
98+
</div>
99+
<div class="inner_cell">
100+
<div class="text_cell_render border-box-sizing rendered_html">
101+
<p>See <a href="https://plot.ly/python/reference/">https://plot.ly/python/reference/</a> for more information!</p>
123102

124-
</div>{% endraw %}
103+
</div>
104+
</div>
105+
</div>{% endraw %}

_posts/python/3d-ribbon/ribbon.ipynb

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
{
22
"cells": [
3-
{
4-
"cell_type": "markdown",
5-
"metadata": {},
6-
"source": [
7-
"New to Plotly's Python API? <br>\n",
8-
"Learn about API authentication here: https://plot.ly/python/getting-started <br>\n",
9-
"Find your api_key here: https://plot.ly/settings/api"
10-
]
11-
},
123
{
134
"cell_type": "markdown",
145
"metadata": {},
@@ -26,7 +17,7 @@
2617
{
2718
"data": {
2819
"text/html": [
29-
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~chelsea_lyn/11589.embed\" height=\"525px\" width=\"100%\"></iframe>"
20+
"<iframe id=\"igraph\" scrolling=\"no\" style=\"border:none;\" seamless=\"seamless\" src=\"https://plot.ly/~demo_account/28.embed\" height=\"525px\" width=\"100%\"></iframe>"
3021
],
3122
"text/plain": [
3223
"<plotly.tools.PlotlyDisplay object>"
@@ -74,6 +65,20 @@
7465
"py.iplot(fig, filename='ribbon-plot-python')"
7566
]
7667
},
68+
{
69+
"cell_type": "markdown",
70+
"metadata": {},
71+
"source": [
72+
"#### Reference"
73+
]
74+
},
75+
{
76+
"cell_type": "markdown",
77+
"metadata": {},
78+
"source": [
79+
"See https://plot.ly/python/reference/ for more information!"
80+
]
81+
},
7782
{
7883
"cell_type": "code",
7984
"execution_count": 3,
@@ -110,15 +115,13 @@
110115
"output_type": "stream",
111116
"text": [
112117
"Collecting git+https://github.com/plotly/publisher.git\n",
113-
" Cloning https://github.com/plotly/publisher.git to /var/folders/72/g6h98xwx0h1gp4kc8rzhsdh80000gn/T/pip-MdKN8j-build\n",
118+
" Cloning https://github.com/plotly/publisher.git to /var/folders/j3/gt_q6y096cjfts4q8zq2dm2c0000gn/T/pip-58pjqI-build\n",
114119
"Installing collected packages: publisher\n",
115120
" Found existing installation: publisher 0.10\n",
116121
" Uninstalling publisher-0.10:\n",
117122
" Successfully uninstalled publisher-0.10\n",
118-
" Running setup.py install for publisher ... \u001b[?25l-\b \bdone\n",
119-
"\u001b[?25hSuccessfully installed publisher-0.10\n",
120-
"\u001b[33mYou are using pip version 8.0.3, however version 8.1.1 is available.\n",
121-
"You should consider upgrading via the 'pip install --upgrade pip' command.\u001b[0m\n"
123+
" Running setup.py install for publisher\n",
124+
"Successfully installed publisher-0.10\n"
122125
]
123126
}
124127
],
@@ -133,9 +136,11 @@
133136
"publisher.publish(\n",
134137
" 'ribbon.ipynb', 'python/ribbon-plots/', 'Python Ribbon Plots | plotly',\n",
135138
" 'How to make ribbon plots in Python. ',\n",
139+
" title = 'Python Ribbon Plots | plotly',\n",
136140
" name = 'Ribbon Plots',\n",
137-
" thumbnail='/images/ribbon-plot.png', language='python',\n",
138-
" page_type='example_index', has_thumbnail='true', display_as='3d_charts', order=5)"
141+
" has_thumbnail='true', thumbnail='/images/ribbon-plot.png', \n",
142+
" language='python', page_type='example_index', \n",
143+
" display_as='3d_charts', order=5)"
139144
]
140145
},
141146
{
@@ -164,7 +169,7 @@
164169
"name": "python",
165170
"nbconvert_exporter": "python",
166171
"pygments_lexer": "ipython2",
167-
"version": "2.7.11"
172+
"version": "2.7.9"
168173
}
169174
},
170175
"nbformat": 4,

0 commit comments

Comments
 (0)