Skip to content

Commit

Permalink
Merge branch 'source' into new-design-2016
Browse files Browse the repository at this point in the history
# Conflicts:
#	_includes/documentation_eg.html
#	_includes/head.html
#	_includes/lang-splash-banner.html
#	_includes/side-bar.html
#	_layouts/base.html
#	_layouts/langindex.html
#	_posts/ggplot2/Aesthetics/2016-01-27-aes_index.html
#
_posts/ggplot2/Faceting/facet_grid/2015-04-09-facets_ggplot2_index.html
#	_posts/ggplot2/Faceting/facet_wrap/2015-07-14-facet_wrap_index.html
#	_posts/ggplot2/Theme/axis.text/2016-01-27-Themes_axistext_index.html
#	_posts/ggplot2/Theme/axis.ticks/2016-01-27-Themes_axisticks_index.html
#
_posts/ggplot2/Theme/axis.title/2016-01-27-Themes_axistitles_index.html
#	_posts/ggplot2/time-series/2015-07-14-time-series_ggplot2_index.html
#	_posts/ggplot2/yscale/2015-07-20-log_scale_index.html
#	_posts/matlab/backgrounds/2016-02-17-backgrounds_matlab_index.html
#	_posts/matlab/labels/2015-04-15-matlab-setting-title.html
#
_posts/matlab/quiver-plots/2016-02-28-matlab-quiver-plot-with-points.htm
l
#	_posts/matlab/quiver-plots/2016-02-28-quiver-plot.html
#	_posts/matlab/quiver-plots/2016-02-28-quiver_matlab_index.html
#
_posts/matplotlib/backgrounds/2016-02-12-backgrounds_matplotlib_index.ht
ml
#	_posts/matplotlib/box/2016-02-08-box_matplotlib_index.html
#	_posts/matplotlib/error-bar/2016-02-08-error-bar_matplotlib_index.html
#	_posts/matplotlib/heatmap/2016-02-08-heatmap_matplotlib_index.html
#	_posts/matplotlib/labels/2015-04-15-mpl-setting-title-on-subplots.html
#	_posts/matplotlib/labels/2015-04-15-mpl-setting-title.html
#	_posts/matplotlib/labels/2016-02-15-labels_matplotlib_index.html
#
_posts/matplotlib/lines-and-markers/2016-02-08-lines-and-markers_matplot
lib_index.html
#
_posts/matplotlib/quiver-plots/2016-02-22-mpl-quiver-plot-with-points.ht
ml
#	_posts/matplotlib/quiver-plots/2016-02-22-quiver_matplotlib_index.html
#
_posts/matplotlib/static-image/2016-02-22-static-image_matplotlib_index.
md
#	_posts/matplotlib/subplots/2016-02-11-mpl-subplot-variable-widths.html
#	_posts/matplotlib/time-series/2016-02-12-mpl-bsaic-time-series.html
#
_posts/matplotlib/time-series/2016-02-12-time-series_matplotlib_index.ht
ml
#
_posts/plotly_js/continuous-error-bars/2016-02-15-continuous-error-bar_p
lotly_js_index.html
#
_posts/plotly_js/continuous-error-bars/2016-02-15-continuous-variable.ht
ml
#	_posts/plotly_js/continuous-error-bars/2016-02-15-filled-lines.html
#	_posts/plotly_js/trisurf/2016-02-29-trisurf-basic.html
#	_posts/plotly_js/trisurf/2016-02-29-trisurf_plotly_js_index.html
#
_posts/python/continuous-error-bars/2016-02-15-continuous-error-bar_pyth
on_index.html
#
_posts/python/continuous-error-bars/2016-02-15-continuous-variable.html
#	_posts/python/continuous-error-bars/2016-02-15-filled-lines.html
#	_posts/user_guide_python/plotly_offline.ipynb
  • Loading branch information
aulneau committed Mar 16, 2016
2 parents eeb11de + bd396d3 commit 19b4f21
Show file tree
Hide file tree
Showing 12 changed files with 3,645 additions and 5 deletions.
40 changes: 40 additions & 0 deletions _includes/documentation_eg.html
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
{% endif %}
{% endfor %}


<!-- START OF GGPLOT CUSTOM LAYOUT -->

<!-- Aesthetics -->
Expand Down Expand Up @@ -811,6 +812,45 @@

{% else %}

{% if layout_options_ggplot %}
<hr>
<h4 class="example-section-title" id="layout-options">
<a class="no_underline plot-blue" href="#layout-options">Layout Options</a></h4>
<div class="row">
<div class="six columns">
<ul >
{% assign counter=0 %}
{% for page in languagelist %}
{% if page.display_as == "layout_opt" %}
{% if counter == 6 %}</ul></div><div class="six columns"><ul>{% endif %}
<li><a class="no-list-style" href="/{{page.permalink}}">{{page.name}}</a></li>
{% assign counter=counter | plus:1 %}
{% endif %}
{% endfor %}
</ul>
</div>
</div>

<h4 class="example-section-title" id="static-image-export">
<a class="no_underline plot-blue" href="#static-image-export">Image Export & Retrieving Plots</a></h4>
<div class="row">
<div class="six columns">
<ul>
{% assign counter=0 %}
{% for page in languagelist %}
{% if page.display_as == "get_request" %}
{% if counter == 4 %}</ul></div><div class="six columns"><ul>{% endif %}
<li><a class="no-list-style" href="/{{page.permalink}}">{{page.name}}</a></li>
{% assign counter=counter | plus:1 %}
{% endif %}
{% endfor %}
</ul>
</div>
</div>
{% endif %}

{% else %}

{% if layout_options %}

<section class="--tutorial-section no-image" id="layout-options">
Expand Down
2 changes: 1 addition & 1 deletion _includes/head.html
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
crossorigin="anonymous"></script>


</head>
</head>
1 change: 0 additions & 1 deletion _includes/lang-splash-banner.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ <h2 class="special-header">
Learn more about <a href="https://plot.ly/javascript/open-source-announcement">why we've open
sourced</a>
</p>

{% else %}
<p>Plotly for {{ page.language | capitalize }} is now entirely open source, free, and self-hosted</p>
<p>
Expand Down
1 change: 0 additions & 1 deletion _includes/side-bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
{% assign pages_list = site.posts | where:"language", language %}

{% for page in pages_list %}

{% if page.display_as == "chart_type" or page.display_as == "basic" %}
{% assign basic = true %}
{% elsif page.display_as == "advanced_charts"%}
Expand Down
Empty file modified _layouts/base.html
100755 → 100644
Empty file.
2 changes: 0 additions & 2 deletions _layouts/langindex.html
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@

</main>



{% include helpbox.html %}

{% include _new/_page-components/_footer-main.html %}
Expand Down
4 changes: 4 additions & 0 deletions _posts/2015-05-25-ipython-notebooks_gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
<p>
Instructions on how to install IPython can be found <a class="no_underline plot-blue" href="http://ipython.org/install.html">here</a>.
</p>
<br>
<p>
Instructions on how to install IPython can be found <a class="no_underline plot-blue" href="http://ipython.org/install.html">here</a>.
</p>

<section>

Expand Down
169 changes: 169 additions & 0 deletions _posts/user_guide_python/2015-06-30-bar_chart_stream.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
---
permalink: python/bar_chart_stream/
description: Getting Started with Plotly Streaming
title: Bar Chart Streaming Demo
has_thumbnail: true
thumbnail:
has_thumbnail: false
layout: user-guide
page_type: u-guide
language: python
title: Bar Chart Streaming
---
{% raw %}
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Streaming-Bar-Chart-Demo">Streaming Bar Chart Demo<a class="anchor-link" href="#Streaming-Bar-Chart-Demo">&#182;</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[1]:</div>
<div class="inner_cell">
<div class="input_area">
<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>
<span class="kn">import</span> <span class="nn">plotly.tools</span> <span class="kn">as</span> <span class="nn">tls</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">time</span>

<span class="kn">from</span> <span class="nn">plotly.graph_objs</span> <span class="kn">import</span> <span class="o">*</span>

<span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>

<span class="n">stream_id</span> <span class="o">=</span> <span class="s">&#39;jkc6d90yfw&#39;</span>

<span class="c"># We can generate a new stream id object</span>
<span class="n">stream</span> <span class="o">=</span> <span class="n">Stream</span><span class="p">(</span>
<span class="n">token</span><span class="o">=</span><span class="n">stream_id</span><span class="p">,</span>
<span class="n">maxpoints</span><span class="o">=</span><span class="mi">80</span>
<span class="p">)</span>
</pre></div>

</div>
</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[2]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython2"><pre><span class="c">#A simple bar chart object is generated</span>

<span class="n">trace1</span> <span class="o">=</span> <span class="n">Bar</span><span class="p">(</span>
<span class="n">x</span><span class="o">=</span><span class="p">[</span><span class="s">&#39;one&#39;</span><span class="p">,</span><span class="s">&#39;two&#39;</span><span class="p">,</span><span class="s">&#39;three&#39;</span><span class="p">,</span><span class="s">&#39;four&#39;</span><span class="p">,</span><span class="s">&#39;five&#39;</span><span class="p">],</span>
<span class="n">y</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">20</span><span class="p">,</span><span class="mi">20</span><span class="p">,</span><span class="mi">20</span><span class="p">,</span><span class="mi">20</span><span class="p">,</span><span class="mi">20</span><span class="p">]),</span>
<span class="n">stream</span><span class="o">=</span><span class="n">stream</span> <span class="c">#we set the stream parameter to the stream id object created earlier </span>
<span class="p">)</span>

<span class="n">data</span> <span class="o">=</span> <span class="n">Data</span><span class="p">([</span><span class="n">trace1</span><span class="p">])</span>
<span class="n">layout</span> <span class="o">=</span> <span class="n">Layout</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s">&#39;Bar Chart Streaming&#39;</span><span class="p">)</span>
<span class="n">fig</span> <span class="o">=</span> <span class="n">Figure</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">data</span><span class="p">,</span> <span class="n">layout</span><span class="o">=</span><span class="n">layout</span><span class="p">)</span>
</pre></div>

</div>
</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython2"><pre><span class="n">py</span><span class="o">.</span><span class="n">plot</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="s">&#39;bar-chart&#39;</span><span class="p">)</span> <span class="c">#post this plot up onto the plotly servers</span>
</pre></div>

</div>
</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[13]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython2"><pre><span class="c">#Now a Stream object is created w/ the same stream_id as the stream id object</span>

<span class="n">s</span> <span class="o">=</span> <span class="n">py</span><span class="o">.</span><span class="n">Stream</span><span class="p">(</span><span class="n">stream_id</span><span class="p">)</span>
<span class="n">s</span><span class="o">.</span><span class="n">open</span><span class="p">()</span>
</pre></div>

</div>
</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython2"><pre><span class="k">while</span> <span class="bp">True</span><span class="p">:</span>

<span class="n">s</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="nb">dict</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="p">[</span><span class="s">&#39;one&#39;</span><span class="p">,</span><span class="s">&#39;two&#39;</span><span class="p">,</span><span class="s">&#39;three&#39;</span><span class="p">,</span><span class="s">&#39;four&#39;</span><span class="p">,</span><span class="s">&#39;five&#39;</span><span class="p">],</span> <span class="n">y</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">random_integers</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">100</span><span class="p">,</span><span class="mi">5</span><span class="p">)))</span>

<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mf">0.2</span><span class="p">)</span> <span class="c">#wait one second before plotting again</span>

<span class="n">s</span><span class="o">.</span><span class="n">close</span><span class="p">()</span> <span class="c">#close the stream</span>
</pre></div>

</div>
</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[6]:</div>
<div class="inner_cell">
<div class="input_area">
<div class=" highlight hl-ipython2"><pre><span class="n">tls</span><span class="o">.</span><span class="n">embed</span><span class="p">(</span><span class="s">&#39;https://plot.ly/~streaming-demos/116/bar-chart-streaming&#39;</span><span class="p">)</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area"><div class="prompt output_prompt">Out[6]:</div>

<div class="output_html rendered_html output_subarea output_execute_result">
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~streaming-demos/116.embed" height="525" width="100%"></iframe>
</div>

</div>

</div>
</div>

</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<div style="float:right; \">
<img src="http://i.imgur.com/4vwuxdJ.png"
align=right style="float:right; margin-left: 5px; margin-top: -10px" />
</div>

<h4>Got Questions or Feedback? </h4>

<p>Reach us here at: <a href="https://community.plot.ly" target="_blank">Plotly Community</a></p>
<p><h4> What's going on at Plotly? </h4>
Check out our twitter:
<a href="https://twitter.com/plotlygraphs" target="_blank">@plotlygraphs</a></p>

</div>
</div>
</div>{% endraw %}
Loading

0 comments on commit 19b4f21

Please sign in to comment.