Skip to content

facet python doc #773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 3, 2017
Merged

facet python doc #773

merged 5 commits into from
Jul 3, 2017

Conversation

Kully
Copy link
Contributor

@Kully Kully commented Jun 20, 2017

No description provided.

@Kully
Copy link
Contributor Author

Kully commented Jun 20, 2017

@cldougl shall I wait to merge plotly/plotly.py#776 before merging this?

besides the example that uses the histogram, it's ready for a review/suggestions whenever you can get to it :)

"source": [
"import pandas as pd\n",
"\n",
"mpg = pd.read_table('https://raw.githubusercontent.com/plotly/datasets/master/mpg_2017.txt')\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put the dataset with the specific example that it's with so users don't have to import more than necessary / can cut down on copy & pasting

<span class="k">del</span> <span class="n">trace</span><span class="p">[</span><span class="s1">&#39;marker&#39;</span><span class="p">][</span><span class="s1">&#39;size&#39;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">trace</span><span class="p">[</span><span class="s1">&#39;mode&#39;</span><span class="p">]</span>

<span class="n">py</span><span class="o">.</span><span class="n">iplot</span><span class="p">(</span><span class="n">fig</span><span class="p">,</span> <span class="n">filename</span><span class="o">=</span><span class="s1">&#39;facet - bar traces&#39;</span><span class="p">)</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't call this bar traces cause it's a histogram and we don't want to confuse people that they can plot bar graphs if only histograms are available

x=&#39;wt&#39;,
y=&#39;mpg&#39;,
facet_col=&#39;cyl&#39;,
facet_col_labels={4: &#34;$\alpha$&#34;, 6: &#39;$\beta$&#39;, 8: &#39;$\sqrt[y]{x}$&#39;},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make these labels coincide/relate to the graph in the example

@@ -0,0 +1,804 @@
---
permalink: python/facet-trellis/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll just check on the url before we merge this

title: Python Facet and Trellis Plots | plotly
display_as: statistical
has_thumbnail: true
page_type: u-guide
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's some extra fields here- you can simplify this by making the publisher example the same as in the readme (https://github.com/plotly/documentation/tree/source-design-merge/_posts/python) // pasted below

! pip install git+https://github.com/plotly/publisher.git --upgrade
import publisher
publisher.publish(
    'your-tutorial-chart.ipynb', 'python/your-tutorial-chart/', 'Your Tutorial Chart',
    'How to make your-tutorial-chart plots in Python with Plotly.',
    title = 'Python Your Tutorial Chart | Plotly',
    has_thumbnail='true', thumbnail='thumbnail/your-tutorial-chart.jpg', 
    language='python', 
    # page_type='example_index', // note this is only if you want the tutorial to appear on the main page: plot.ly/python
    display_as='chart_type', order=2,
    ipynb= '~notebook_demo/1')

description: How to make Facet and Trellis Plots in Python with Plotly.
name: Facet and Trellis Plots | plotly
has_thumbnail: true
thumbnail: thumbnail/facet-trellis-thumbnail.jpg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice thumbnail!

@cldougl
Copy link
Member

cldougl commented Jul 3, 2017

@Kully this lgtm -- can you just update the version check cell to reflect the new plotly.py version (cause that's where hist traces are available right?)
then good to 💃

@Kully Kully merged commit fd1d421 into source-design-merge Jul 3, 2017
@Kully Kully deleted the facet_grid_doc branch July 3, 2017 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants