Skip to content

Commit 94a8105

Browse files
chelsea's comments
1 parent 7e51712 commit 94a8105

File tree

2 files changed

+16
-45
lines changed

2 files changed

+16
-45
lines changed

_posts/python/statistical/facet-trellis/2015-06-30-facet-and-trellis-plots.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
---
22
permalink: python/facet-trellis/
33
description: How to make Facet and Trellis Plots in Python with Plotly.
4-
name: Facet and Trellis Plots | plotly
4+
name: Facet and Trellis Plots
55
has_thumbnail: true
66
thumbnail: thumbnail/facet-trellis-thumbnail.jpg
77
layout: user-guide
8-
name: Facet and Trellis Plots
98
language: python
109
title: Python Facet and Trellis Plots | plotly
1110
display_as: statistical
1211
has_thumbnail: true
13-
page_type: u-guide
12+
page_type: example_index
1413
order: 10.2
1514
---
1615
{% raw %}
@@ -419,7 +418,7 @@ <h4 id="Custom-Labels">Custom Labels<a class="anchor-link" href="#Custom-Labels"
419418
<span class="n">x</span><span class="o">=</span><span class="s1">&#39;wt&#39;</span><span class="p">,</span>
420419
<span class="n">y</span><span class="o">=</span><span class="s1">&#39;mpg&#39;</span><span class="p">,</span>
421420
<span class="n">facet_col</span><span class="o">=</span><span class="s1">&#39;cyl&#39;</span><span class="p">,</span>
422-
<span class="n">facet_col_labels</span><span class="o">=</span><span class="p">{</span><span class="mi">4</span><span class="p">:</span> <span class="s2">&quot;$</span><span class="se">\\</span><span class="s2">alpha$&quot;</span><span class="p">,</span> <span class="mi">6</span><span class="p">:</span> <span class="s1">&#39;$</span><span class="se">\\</span><span class="s1">beta$&#39;</span><span class="p">,</span> <span class="mi">8</span><span class="p">:</span> <span class="s1">&#39;$\sqrt[y]{x}$&#39;</span><span class="p">},</span>
421+
<span class="n">facet_col_labels</span><span class="o">=</span><span class="p">{</span><span class="mi">4</span><span class="p">:</span> <span class="s1">&#39;$2^2 = 4$&#39;</span><span class="p">,</span> <span class="mi">6</span><span class="p">:</span> <span class="s1">&#39;$</span><span class="se">\\</span><span class="s1">frac{18}{3} = 6$&#39;</span><span class="p">,</span> <span class="mi">8</span><span class="p">:</span> <span class="s1">&#39;$2\cdot4 = 8$&#39;</span><span class="p">},</span>
423422
<span class="n">marker</span><span class="o">=</span><span class="p">{</span><span class="s1">&#39;color&#39;</span><span class="p">:</span> <span class="s1">&#39;rgb(240, 100, 2)&#39;</span><span class="p">},</span>
424423
<span class="p">)</span>
425424

@@ -625,7 +624,7 @@ <h4 id="Other-Trace-Types">Other Trace Types<a class="anchor-link" href="#Other-
625624
</div>
626625
<div class="cell border-box-sizing code_cell rendered">
627626
<div class="input">
628-
<div class="prompt input_prompt">In&nbsp;[17]:</div>
627+
<div class="prompt input_prompt">In&nbsp;[13]:</div>
629628
<div class="inner_cell">
630629
<div class="input_area">
631630
<div class=" highlight hl-ipython2"><pre><span></span><span class="kn">import</span> <span class="nn">plotly.plotly</span> <span class="kn">as</span> <span class="nn">py</span>
@@ -655,7 +654,7 @@ <h4 id="Other-Trace-Types">Other Trace Types<a class="anchor-link" href="#Other-
655654

656655
<div class="output_area">
657656

658-
<div class="prompt output_prompt">Out[17]:</div>
657+
<div class="prompt output_prompt">Out[13]:</div>
659658

660659

661660

@@ -679,7 +678,7 @@ <h4 id="Reference">Reference<a class="anchor-link" href="#Reference">&#194;&#182
679678
</div>
680679
<div class="cell border-box-sizing code_cell rendered">
681680
<div class="input">
682-
<div class="prompt input_prompt">In&nbsp;[18]:</div>
681+
<div class="prompt input_prompt">In&nbsp;[14]:</div>
683682
<div class="inner_cell">
684683
<div class="input_area">
685684
<div class=" highlight hl-ipython2"><pre><span></span><span class="n">help</span><span class="p">(</span><span class="n">ff</span><span class="o">.</span><span class="n">create_facet_grid</span><span class="p">)</span>

_posts/python/statistical/facet-trellis/facet-and-trellis-plots.ipynb

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@
344344
" x='wt',\n",
345345
" y='mpg',\n",
346346
" facet_col='cyl',\n",
347-
" facet_col_labels={4: \"$\\\\alpha$\", 6: '$\\\\beta$', 8: '$\\sqrt[y]{x}$'},\n",
347+
" facet_col_labels={4: '$2^2 = 4$', 6: '$\\\\frac{18}{3} = 6$', 8: '$2\\cdot4 = 8$'},\n",
348348
" marker={'color': 'rgb(240, 100, 2)'},\n",
349349
")\n",
350350
"\n",
@@ -495,7 +495,7 @@
495495
},
496496
{
497497
"cell_type": "code",
498-
"execution_count": 12,
498+
"execution_count": 13,
499499
"metadata": {},
500500
"outputs": [
501501
{
@@ -507,7 +507,7 @@
507507
"<plotly.tools.PlotlyDisplay object>"
508508
]
509509
},
510-
"execution_count": 12,
510+
"execution_count": 13,
511511
"metadata": {},
512512
"output_type": "execute_result"
513513
}
@@ -539,7 +539,7 @@
539539
},
540540
{
541541
"cell_type": "code",
542-
"execution_count": 13,
542+
"execution_count": 14,
543543
"metadata": {},
544544
"outputs": [
545545
{
@@ -721,39 +721,15 @@
721721
},
722722
{
723723
"cell_type": "code",
724-
"execution_count": 14,
724+
"execution_count": 15,
725725
"metadata": {},
726726
"outputs": [
727-
{
728-
"data": {
729-
"text/html": [
730-
"<link href=\"//fonts.googleapis.com/css?family=Open+Sans:600,400,300,200|Inconsolata|Ubuntu+Mono:400,700rel=\"stylesheet\" type=\"text/css\" />"
731-
],
732-
"text/plain": [
733-
"<IPython.core.display.HTML object>"
734-
]
735-
},
736-
"metadata": {},
737-
"output_type": "display_data"
738-
},
739-
{
740-
"data": {
741-
"text/html": [
742-
"<link rel=\"stylesheet\" type=\"text/csshref=\"http://help.plot.ly/documentation/all_static/css/ipython-notebook-custom.css\">"
743-
],
744-
"text/plain": [
745-
"<IPython.core.display.HTML object>"
746-
]
747-
},
748-
"metadata": {},
749-
"output_type": "display_data"
750-
},
751727
{
752728
"name": "stdout",
753729
"output_type": "stream",
754730
"text": [
755731
"Collecting git+https://github.com/plotly/publisher.git\n",
756-
" Cloning https://github.com/plotly/publisher.git to /private/var/folders/tc/bs9g6vrd36q74m5t8h9cgphh0000gn/T/pip-Qtdk2b-build\n",
732+
" Cloning https://github.com/plotly/publisher.git to /private/var/folders/tc/bs9g6vrd36q74m5t8h9cgphh0000gn/T/pip-izMtrr-build\n",
757733
"Installing collected packages: publisher\n",
758734
" Found existing installation: publisher 0.10\n",
759735
" Uninstalling publisher-0.10:\n",
@@ -778,20 +754,16 @@
778754
}
779755
],
780756
"source": [
781-
"from IPython.display import display, HTML\n",
782-
"\n",
783-
"display(HTML('<link href=\"//fonts.googleapis.com/css?family=Open+Sans:600,400,300,200|Inconsolata|Ubuntu+Mono:400,700rel=\"stylesheet\" type=\"text/css\" />'))\n",
784-
"display(HTML('<link rel=\"stylesheet\" type=\"text/csshref=\"http://help.plot.ly/documentation/all_static/css/ipython-notebook-custom.css\">'))\n",
785-
"\n",
786757
"! pip install git+https://github.com/plotly/publisher.git --upgrade\n",
787758
"import publisher\n",
788759
"publisher.publish(\n",
789-
" 'facet-and-trellis-plots.ipynb', 'python/facet-trellis/', 'Facet and Trellis Plots | plotly',\n",
760+
" 'facet-and-trellis-plots.ipynb', 'python/facet-trellis/', 'Facet and Trellis Plots',\n",
790761
" 'How to make Facet and Trellis Plots in Python with Plotly.',\n",
791762
" title = 'Python Facet and Trellis Plots | plotly',\n",
792-
" name = 'Facet and Trellis Plots',\n",
793763
" has_thumbnail='true', thumbnail='thumbnail/facet-trellis-thumbnail.jpg',\n",
794-
" language='python', display_as='statistical', order=10.2)"
764+
" language='python', \n",
765+
" page_type='example_index',\n",
766+
" display_as='statistical', order=10.2)"
795767
]
796768
},
797769
{

0 commit comments

Comments
 (0)