Skip to content

Commit

Permalink
Merge branch 'source-design-merge' into update_GTM
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Damiba authored Oct 30, 2018
2 parents e86b2aa + 886552b commit 7cfcc1c
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 60 deletions.
8 changes: 8 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@
{% include analytics.html %}
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"


<!-- META TAGS -->
{% include seo.html %}

{% include analytics.html %}
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"
integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS"
crossorigin="anonymous"></script>

Expand Down
4 changes: 2 additions & 2 deletions _includes/seo.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- Facebook tags -->
<meta property="og:title" content="{% if page.name %}{{page.name}}{% else %}plotly{% endif %}"/>
<meta property="og:type" content="website"/>
<meta property="og:image" content="{% if page.imageurl %}{{site.staticurl}}{{page.imageurl}}{% else %}{% if page.thumbnail%}{{site.staticurl}}{{page.thumbnail}}{%else%}https://help.plot.ly/images/twitter-default.png{% endif %}{% endif %}">
<meta property="og:image" content="{% if page.imageurl %}{{site.staticurl}}{{page.imageurl}}{% else %}{% if page.thumbnail%}{{site.imgurl}}{{page.thumbnail}}{%else%}https://help.plot.ly/images/twitter-default.png{% endif %}{% endif %}">
<meta property="og:description" content="{% if page.description %}{{page.description}}{% else %}Plotly is the easiest way to graph and share your data.{% endif %}"/>
<meta property="og:url" />
<meta property="fb:admins" content="1123751525"/>
Expand All @@ -18,7 +18,7 @@
<meta name="twitter:title" content="{% if page.name %}{{page.name}}{% else %}plotly{% endif %}"/>
<meta name="twitter:url" content="{% if page.permalink %}https://help.plot.ly{{page.permalink}}{% endif %}"/>
<meta name="twitter:description" content="{% if page.description %}{{page.description}}{% else %}Plotly is the easiest way to graph and share your data.{% endif %}"/>
<meta name="twitter:image" content="{% if page.imageurl %}{{site.staticurl}}{{page.imageurl}}{% else %}{% if page.thumbnail%}{{site.staticurl}}{{page.thumbnail}}{%else%}https://help.plot.ly/images/twitter-default.png{% endif %}{% endif %}">
<meta name="twitter:image" content="{% if page.imageurl %}{{site.staticurl}}{{page.imageurl}}{% else %}{% if page.thumbnail%}{{site.imgurl}}{{page.thumbnail}}{%else%}https://help.plot.ly/images/twitter-default.png{% endif %}{% endif %}">
<meta name="twitter:site" content="@plotlygraphs"/>

<!-- Favicon -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Change the Default Locale
plot_url: https://codepen.io/plotly/embed/rqrgEQ/?height=600&theme-id=15263&default-tab=result
language: plotly_js
suite: configuration
order: 7.5
sitemap: false
arrangement: horizontal
markdown_content: |
Load and register a non-default locale by adding `<script src="https://cdn.plot.ly/plotly-locale-YOUR-LOCALE-latest.js"></script>`
to your HTML after the plotly.js tag and then reference the locale in the `config`. For Example, the codepen example below has
`<script src="https://cdn.plot.ly/plotly-locale-fr-latest.js"></script>` in its HTML. For more information and a list of available locales, see
[https://github.com/plotly/plotly.js/blob/master/dist/README.md#to-include-localization](https://github.com/plotly/plotly.js/blob/master/dist/README.md#to-include-localization)
---
var trace1 = {
type: "scatter",
mode: "lines",
x: ['2018-01-01', '2018-08-31'],
y: [10, 5],
line: {color: '#17BECF'}
};

var trace2 = {
type: "scatter",
mode: "lines",
x: ['2018-01-01', '2018-08-31'],
y: [3,7],
line: {color: '#7F7F7F'}
};

var data = [trace1,trace2];

var layout = {
title: 'Custom Locale',
};

var config = {locale: 'fr'};

Plotly.newPlot('myDiv', data, layout, config);

62 changes: 34 additions & 28 deletions _posts/python/style/images/2015-06-30-images.html
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ <h4 id="Zoom-on-Static-Images">Zoom on Static Images<a class="anchor-link" href=
<span class="n">yaxis</span> <span class="o">=</span> <span class="n">go</span><span class="o">.</span><span class="n">layout</span><span class="o">.</span><span class="n">YAxis</span><span class="p">(</span>
<span class="n">visible</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="nb">range</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="n">img_height</span><span class="o">*</span><span class="n">scale_factor</span><span class="p">],</span>
<span class="c1"># the scaleanchor attribute ensures that the aspect ratio stays constant</span>
<span class="c1"># the scaleanchor attribute ensures that the aspect ratio stays constant</span>
<span class="n">scaleanchor</span> <span class="o">=</span> <span class="s1">&#39;x&#39;</span><span class="p">),</span>
<span class="n">width</span> <span class="o">=</span> <span class="n">img_width</span><span class="o">*</span><span class="n">scale_factor</span><span class="p">,</span>
<span class="n">height</span> <span class="o">=</span> <span class="n">img_height</span><span class="o">*</span><span class="n">scale_factor</span><span class="p">,</span>
Expand Down Expand Up @@ -387,7 +387,7 @@ <h4 id="Zoom-on-Static-Images">Zoom on Static Images<a class="anchor-link" href=


<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/~michaelbabyn/184.embed" height="450.0px" width="800.0px"></iframe>
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~PythonPlotBot/2841.embed" height="450.0px" width="800.0px"></iframe>
</div>

</div>
Expand Down Expand Up @@ -427,6 +427,7 @@ <h4 id="Interactive-Facial-Recognition-Overlays">Interactive Facial Recognition
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">dlib</span>


<span class="c1">#load dlib&#39;s pretrained face detector</span>
<span class="n">cnn_human_detector</span> <span class="o">=</span> <span class="n">dlib</span><span class="o">.</span><span class="n">cnn_face_detection_model_v1</span><span class="p">(</span><span class="s1">&#39;mmod_human_face_detector.dat&#39;</span><span class="p">)</span>

Expand All @@ -442,31 +443,36 @@ <h4 id="Interactive-Facial-Recognition-Overlays">Interactive Facial Recognition
<span class="n">dog_dets</span> <span class="o">=</span> <span class="n">cnn_dog_detector</span><span class="p">(</span><span class="n">img</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>

<span class="n">layout</span><span class="o">=</span> <span class="n">go</span><span class="o">.</span><span class="n">Layout</span><span class="p">(</span>
<span class="n">xaxis</span> <span class="o">=</span> <span class="n">go</span><span class="o">.</span><span class="n">layout</span><span class="o">.</span><span class="n">XAxis</span><span class="p">(</span><span class="n">showticklabels</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
<span class="n">showgrid</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">zeroline</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="nb">range</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="n">img</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="p">),</span>
<span class="n">yaxis</span> <span class="o">=</span> <span class="n">go</span><span class="o">.</span><span class="n">layout</span><span class="o">.</span><span class="n">YAxis</span><span class="p">(</span><span class="n">showticklabels</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
<span class="n">showgrid</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">zeroline</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="nb">range</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="n">img</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span>
<span class="p">),</span>
<span class="n">autosize</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">height</span><span class="o">=</span><span class="n">img</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="n">width</span><span class="o">=</span><span class="n">img</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="n">images</span><span class="o">=</span> <span class="p">[</span><span class="nb">dict</span><span class="p">(</span>
<span class="n">source</span><span class="o">=</span> <span class="s2">&quot;https://raw.githubusercontent.com/michaelbabyn/plot_data/master/beethoven.jpg&quot;</span><span class="p">,</span>
<span class="n">xref</span><span class="o">=</span> <span class="s2">&quot;paper&quot;</span><span class="p">,</span>
<span class="n">yref</span><span class="o">=</span> <span class="s2">&quot;paper&quot;</span><span class="p">,</span>
<span class="n">x</span><span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
<span class="n">y</span><span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
<span class="n">sizex</span><span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
<span class="n">sizey</span><span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
<span class="n">sizing</span><span class="o">=</span> <span class="s2">&quot;stretch&quot;</span><span class="p">,</span>
<span class="n">opacity</span><span class="o">=</span> <span class="mi">1</span><span class="p">,</span>
<span class="n">layer</span><span class="o">=</span> <span class="s2">&quot;below&quot;</span><span class="p">)]</span>
<span class="p">)</span>
<span class="n">xaxis</span> <span class="o">=</span> <span class="n">go</span><span class="o">.</span><span class="n">layout</span><span class="o">.</span><span class="n">XAxis</span><span class="p">(</span>
<span class="n">showticklabels</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
<span class="n">showgrid</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">zeroline</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="nb">range</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="n">img</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="p">),</span>
<span class="n">yaxis</span> <span class="o">=</span> <span class="n">go</span><span class="o">.</span><span class="n">layout</span><span class="o">.</span><span class="n">YAxis</span><span class="p">(</span>
<span class="n">showticklabels</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
<span class="n">showgrid</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">zeroline</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="nb">range</span> <span class="o">=</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="n">img</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]],</span>
<span class="n">scaleanchor</span> <span class="o">=</span> <span class="s1">&#39;x&#39;</span>
<span class="p">),</span>
<span class="n">autosize</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">height</span><span class="o">=</span><span class="n">img</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="n">width</span><span class="o">=</span><span class="n">img</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="n">margin</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;l&#39;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="s1">&#39;r&#39;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="s1">&#39;t&#39;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="s1">&#39;b&#39;</span><span class="p">:</span> <span class="mi">0</span><span class="p">},</span>
<span class="n">images</span><span class="o">=</span> <span class="p">[</span><span class="nb">dict</span><span class="p">(</span>
<span class="n">source</span><span class="o">=</span> <span class="s2">&quot;https://raw.githubusercontent.com/michaelbabyn/plot_data/master/beethoven.jpg&quot;</span><span class="p">,</span>
<span class="n">x</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>
<span class="n">sizex</span><span class="o">=</span><span class="n">img</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="n">y</span><span class="o">=</span><span class="n">img</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="n">sizey</span><span class="o">=</span><span class="n">img</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="n">xref</span><span class="o">=</span><span class="s2">&quot;x&quot;</span><span class="p">,</span>
<span class="n">yref</span><span class="o">=</span><span class="s2">&quot;y&quot;</span><span class="p">,</span>
<span class="n">opacity</span><span class="o">=</span><span class="mf">1.0</span><span class="p">,</span>
<span class="n">layer</span><span class="o">=</span><span class="s2">&quot;below&quot;</span><span class="p">,</span>
<span class="n">sizing</span><span class="o">=</span><span class="s2">&quot;stretch&quot;</span>
<span class="p">)]</span>
<span class="p">)</span>

<span class="n">humans</span><span class="o">=</span><span class="p">[</span>
<span class="n">go</span><span class="o">.</span><span class="n">Scatter</span><span class="p">(</span>
Expand Down Expand Up @@ -512,7 +518,7 @@ <h4 id="Interactive-Facial-Recognition-Overlays">Interactive Facial Recognition


<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/~michaelbabyn/152.embed" height="388px" width="561px"></iframe>
<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~PythonPlotBot/2843.embed" height="388px" width="561px"></iframe>
</div>

</div>
Expand Down
Loading

0 comments on commit 7cfcc1c

Please sign in to comment.