diff --git a/_includes/documentation_eg.html b/_includes/documentation_eg.html index 089140577dd9..908cb323c685 100644 --- a/_includes/documentation_eg.html +++ b/_includes/documentation_eg.html @@ -627,6 +627,11 @@

{% endif %} +{% if page.dash_url !=blank %} +

Dash Example

+ +{% endif %} + {% if page.language == "python" or page.language == "r" or page.language == "plotly_js" %} {% endif %} diff --git a/_posts/python/3d/2017-02-24-python-3d-index.html b/_posts/python/3d/2017-02-24-python-3d-index.html index b22cf61e6e15..0ea2e17b03f0 100644 --- a/_posts/python/3d/2017-02-24-python-3d-index.html +++ b/_posts/python/3d/2017-02-24-python-3d-index.html @@ -9,6 +9,7 @@ has_thumbnail: true thumbnail: thumbnail/mixed.jpg page_type: example_index +dash_url: https://dash-simple-apps.plotly.host/dash-3dplot/frameBorder=0 order: 20 --- diff --git a/_posts/python/basic/2017-02-24-python-basic-index.html b/_posts/python/basic/2017-02-24-python-basic-index.html index 37ef8b36b5ca..c625d99cf642 100644 --- a/_posts/python/basic/2017-02-24-python-basic-index.html +++ b/_posts/python/basic/2017-02-24-python-basic-index.html @@ -9,6 +9,7 @@ has_thumbnail: true thumbnail: thumbnail/mixed.jpg page_type: example_index +dash_url: https://dash-simple-apps.plotly.host/dash-basicplot/frameBorder=0 order: 8 --- diff --git a/_posts/python/basic/line-plots/2015-06-30-lines.html b/_posts/python/basic/line-plots/2015-06-30-lines.html index 60c569e0825c..f9a056e5ad39 100644 --- a/_posts/python/basic/line-plots/2015-06-30-lines.html +++ b/_posts/python/basic/line-plots/2015-06-30-lines.html @@ -4,20 +4,19 @@ name: Python Line Charts has_thumbnail: true thumbnail: thumbnail/line-plot.jpg -layout: user-guide +title: Python Line Charts | plotly name: Line Charts language: python -title: Python Line Charts | plotly -display_as: basic -has_thumbnail: true page_type: example_index +has_thumbnail: true +display_as: basic order: 3.3 ipynb: ~notebook_demo/3 +layout: user-guide --- {% raw %}
-
-
+

New to Plotly?

Plotly's Python library is free and open source! Get started by downloading the client and reading the primer.
You can set up Plotly to work in online or offline mode, or in jupyter notebooks. @@ -27,8 +26,7 @@

New to Plotly?
-
-
+
@@ -39,11 +37,11 @@

Version CheckIn [1]:

-
import plotly
+
import plotly
 plotly.__version__
 
-
+

@@ -53,7 +51,7 @@

Version Check -
Out[1]:
+
Out[1]:
@@ -69,8 +67,7 @@

Version Check @@ -112,7 +109,7 @@

Simple Line Plot -
Out[2]:
+
Out[2]:
@@ -127,8 +124,7 @@

Simple Line Plot
-
-
+
@@ -139,11 +135,11 @@

Line Plot ModesIn [3]:

@@ -185,7 +181,7 @@

Line Plot Modes -
Out[3]:
+
Out[3]:
@@ -200,8 +196,7 @@

Line Plot Modes
-
-
+
@@ -302,7 +297,7 @@

Style Line Plots -
Out[4]:
+
Out[4]:
@@ -317,8 +312,7 @@

Style Line Plots
-
-
+
@@ -329,25 +323,25 @@

Connect Data GapsIn [5]:

@@ -368,7 +362,7 @@

Connect Data Gaps -
Out[5]:
+
Out[5]:
@@ -383,8 +377,7 @@

Connect Data Gaps
-
-
+
@@ -395,8 +388,8 @@

Interpolation with Line PlotsIn [6]:

@@ -483,7 +476,7 @@

Interpolation with Line Plots -
Out[6]:
+
Out[6]:
@@ -498,8 +491,7 @@

Interpolation with Line Plots
-
-
+
@@ -510,8 +502,8 @@

Label Lines with AnnotationsIn [12]:

-
import plotly.plotly as py
-import plotly.graph_objs as go
+
import plotly.plotly as py
+import plotly.graph_objs as go
 
 title = 'Main Source for News'
 
@@ -545,7 +537,7 @@ 

Label Lines with Annotationsy=y_data[i], mode='lines', line=dict(color=colors[i], width=line_size[i]), - connectgaps=True, + connectgaps=True, )) traces.append(go.Scatter( @@ -557,9 +549,9 @@

Label Lines with Annotationslayout = go.Layout( xaxis=dict( - showline=True, - showgrid=False, - showticklabels=True, + showline=True, + showgrid=False, + showticklabels=True, linecolor='rgb(204, 204, 204)', linewidth=2, ticks='outside', @@ -573,19 +565,19 @@

Label Lines with Annotations), ), yaxis=dict( - showgrid=False, - zeroline=False, - showline=False, - showticklabels=False, + showgrid=False, + zeroline=False, + showline=False, + showticklabels=False, ), - autosize=False, + autosize=False, margin=dict( - autoexpand=False, + autoexpand=False, l=100, r=20, t=110, ), - showlegend=False + showlegend=False ) annotations = [] @@ -595,17 +587,17 @@

Label Lines with Annotations# labeling the left_side of the plot annotations.append(dict(xref='paper', x=0.05, y=y_trace[0], xanchor='right', yanchor='middle', - text=label + ' {}%'.format(y_trace[0]), + text=label + ' {}%'.format(y_trace[0]), font=dict(family='Arial', size=16), - showarrow=False)) + showarrow=False)) # labeling the right_side of the plot annotations.append(dict(xref='paper', x=0.95, y=y_trace[11], xanchor='left', yanchor='middle', - text='{}%'.format(y_trace[11]), + text='{}%'.format(y_trace[11]), font=dict(family='Arial', size=16), - showarrow=False)) + showarrow=False)) # Title annotations.append(dict(xref='paper', yref='paper', x=0.0, y=1.05, xanchor='left', yanchor='bottom', @@ -613,7 +605,7 @@

Label Lines with Annotationsfont=dict(family='Arial', size=30, color='rgb(37,37,37)'), - showarrow=False)) + showarrow=False)) # Source annotations.append(dict(xref='paper', yref='paper', x=0.5, y=-0.1, xanchor='center', yanchor='top', @@ -622,7 +614,7 @@

Label Lines with Annotationsfont=dict(family='Arial', size=12, color='rgb(150,150,150)'), - showarrow=False)) + showarrow=False)) layout['annotations'] = annotations @@ -630,7 +622,7 @@

Label Lines with Annotationspy.iplot(fig, filename='news-source')

-
+
@@ -640,7 +632,7 @@

Label Lines with Annotations -
Out[12]:
+
Out[12]:
@@ -655,8 +647,7 @@

Label Lines with Annotations
-
-
+
@@ -779,7 +770,7 @@

Filled Lines&# +
+
+
In [4]:
+
+
from IPython.display import IFrame
+IFrame(src= "https://dash-simple-apps.plotly.host/dash-lineplot/", width="100%", height="650px", frameBorder="0")
+
+ +
+
+
+ +
+
+ + +
+ +
Out[4]:
+ + + +
+ + + +
+ +
+ +
+
+ +
+
+
-

Reference

See https://plot.ly/python/reference/#scatter for more information and chart attribute options!

+

Find the dash app source code here

diff --git a/_posts/python/basic/line-plots/lines.ipynb b/_posts/python/basic/line-plots/lines.ipynb index 14f45de4dd30..46a147877bd0 100644 --- a/_posts/python/basic/line-plots/lines.ipynb +++ b/_posts/python/basic/line-plots/lines.ipynb @@ -693,6 +693,52 @@ "py.iplot(fig, filename= 'shaded_lines')" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Dash Example" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import IFrame\n", + "IFrame(src= \"https://dash-simple-apps.plotly.host/dash-lineplot/\", width=\"100%\", height=\"650px\", frameBorder=\"0\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Find the dash app source code [here](https://github.com/plotly/simple-example-chart-apps/tree/master/line)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -703,7 +749,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -729,20 +775,6 @@ }, "metadata": {}, "output_type": "display_data" - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Python27\\lib\\site-packages\\IPython\\nbconvert.py:13: ShimWarning:\n", - "\n", - "The `IPython.nbconvert` package has been deprecated since IPython 4.0. You should import from nbconvert instead.\n", - "\n", - "C:\\Python27\\lib\\site-packages\\publisher\\publisher.py:53: UserWarning:\n", - "\n", - "Did you \"Save\" this notebook before running this command? Remember to save, always save.\n", - "\n" - ] } ], "source": [ @@ -763,35 +795,26 @@ " page_type='example_index', has_thumbnail='true', display_as='basic', order=3.3,\n", " ipynb= '~notebook_demo/3')" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python 2", + "display_name": "Python 3", "language": "python", - "name": "python2" + "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", - "version": 2 + "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.14" + "pygments_lexer": "ipython3", + "version": "3.7.2" } }, "nbformat": 4, diff --git a/_posts/python/layout/labels/2015-06-30-labels.html b/_posts/python/layout/labels/2015-06-30-labels.html index f6467c503797..9181d56306bd 100644 --- a/_posts/python/layout/labels/2015-06-30-labels.html +++ b/_posts/python/layout/labels/2015-06-30-labels.html @@ -16,8 +16,7 @@ --- {% raw %}
-
-
+

New to Plotly?

Plotly's Python library is free and open source! Get started by downloading the client and reading the primer.
You can set up Plotly to work in online or offline mode, or in jupyter notebooks. @@ -27,8 +26,7 @@

New to Plotly?
-
-
+

Version Check

Plotly's Python API is updated frequently. Run pip install plotly --upgrade to update your Plotly version.

@@ -44,7 +42,7 @@

Version Checkplotly.__version__

-
+

@@ -54,7 +52,7 @@

Version Check -
Out[1]:
+
Out[1]:
@@ -119,7 +117,7 @@

Version Checkpy.iplot(fig, filename='styling-names')

- + @@ -129,7 +127,7 @@

Version Check -
Out[2]:
+
Out[2]:
@@ -144,8 +142,63 @@

Version Check +
+
+
In [1]:
+
+
from IPython.display import IFrame
+IFrame(src= "https://dash-simple-apps.plotly.host/dash-figurelabelsplot/", width="100%", height="650px", frameBorder="0")
+
+ +
+
+
+ +
+
+ + +
+ +
Out[1]:
+ + + +
+ + + +
+ +
+ +
+
+ +
+
+
+
+

Find the dash app source code here

+ +
+
+
+
+

Reference

See https://plot.ly/python/reference/#layout for more information!

diff --git a/_posts/python/layout/labels/labels.ipynb b/_posts/python/layout/labels/labels.ipynb index 5d0464b82caa..9423b588e094 100644 --- a/_posts/python/layout/labels/labels.ipynb +++ b/_posts/python/layout/labels/labels.ipynb @@ -104,6 +104,52 @@ "py.iplot(fig, filename='styling-names')" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Dash Example" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import IFrame\n", + "IFrame(src= \"https://dash-simple-apps.plotly.host/dash-figurelabelsplot/\", width=\"100%\", height=\"650px\", frameBorder=\"0\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Find the dash app source code [here](https://github.com/plotly/simple-example-chart-apps/tree/master/figurelabels)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -114,7 +160,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -146,18 +192,16 @@ "output_type": "stream", "text": [ "Collecting git+https://github.com/plotly/publisher.git\n", - " Cloning https://github.com/plotly/publisher.git to /tmp/pip-req-build-g_hb8ys1\n", + " Cloning https://github.com/plotly/publisher.git to /private/var/folders/s5/vjqn03zs7nn8zs_fwzcf14r40000gn/T/pip-req-build-6uxltodf\n", "Building wheels for collected packages: publisher\n", - " Running setup.py bdist_wheel for publisher ... \u001b[?25ldone\n", - "\u001b[?25h Stored in directory: /tmp/pip-ephem-wheel-cache-clgwp6cl/wheels/99/3e/a0/fbd22ba24cca72bdbaba53dbc23c1768755fb17b3af0f33966\n", + " Building wheel for publisher (setup.py) ... \u001b[?25ldone\n", + "\u001b[?25h Stored in directory: /private/var/folders/s5/vjqn03zs7nn8zs_fwzcf14r40000gn/T/pip-ephem-wheel-cache-k18ub0dj/wheels/99/3e/a0/fbd22ba24cca72bdbaba53dbc23c1768755fb17b3af0f33966\n", "Successfully built publisher\n", "Installing collected packages: publisher\n", " Found existing installation: publisher 0.13\n", " Uninstalling publisher-0.13:\n", " Successfully uninstalled publisher-0.13\n", - "Successfully installed publisher-0.13\n", - "\u001b[33mYou are using pip version 10.0.1, however version 19.0.3 is available.\n", - "You should consider upgrading via the 'pip install --upgrade pip' command.\u001b[0m\n" + "Successfully installed publisher-0.13\n" ] } ], @@ -178,13 +222,6 @@ " page_type='example_index', has_thumbnail='false', display_as='layout_opt', order=0.5, \n", " ipynb='~notebook_demo/271')" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -203,7 +240,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.5" + "version": "3.7.2" } }, "nbformat": 4, diff --git a/_posts/python/maps/2017-02-24-python-maps-index.html b/_posts/python/maps/2017-02-24-python-maps-index.html index e5fb6d521ad8..a8f9588b15ce 100644 --- a/_posts/python/maps/2017-02-24-python-maps-index.html +++ b/_posts/python/maps/2017-02-24-python-maps-index.html @@ -9,6 +9,7 @@ has_thumbnail: true thumbnail: thumbnail/mixed.jpg page_type: example_index +dash_url: https://dash-simple-apps.plotly.host/dash-mapplot/frameBorder=0 order: 20 --- diff --git a/_posts/python/statistical/2017-02-24-python-statistic-index.html b/_posts/python/statistical/2017-02-24-python-statistic-index.html index 2e42cbed08f0..97621a1b294e 100644 --- a/_posts/python/statistical/2017-02-24-python-statistic-index.html +++ b/_posts/python/statistical/2017-02-24-python-statistic-index.html @@ -9,6 +9,7 @@ has_thumbnail: true thumbnail: thumbnail/mixed.jpg page_type: example_index +dash_url: https://dash-simple-apps.plotly.host/dash-statisticalplot/frameBorder=0 order: 20 --- diff --git a/_posts/python/subplots/multiple-axes/2015-06-30-multiple-axes.html b/_posts/python/subplots/multiple-axes/2015-06-30-multiple-axes.html index b73969900486..c3d4761ac3ab 100644 --- a/_posts/python/subplots/multiple-axes/2015-06-30-multiple-axes.html +++ b/_posts/python/subplots/multiple-axes/2015-06-30-multiple-axes.html @@ -16,8 +16,7 @@ --- {% raw %}
-
-
+

New to Plotly?

Plotly's Python library is free and open source! Get started by downloading the client and reading the primer.
You can set up Plotly to work in online or offline mode, or in jupyter notebooks. @@ -27,8 +26,7 @@

New to Plotly?
-
-
+
-

+
@@ -85,7 +83,7 @@

Two Y Axes -
Out[5]:
+
Out[5]:
@@ -100,8 +98,7 @@

Two Y Axes +

@@ -207,7 +204,7 @@

Multiple Axes -
Out[6]:
+
Out[6]:
@@ -222,8 +219,7 @@

Multiple Axes + @@ -396,7 +392,7 @@

Muliple Y-Axes Subplots -
Out[1]:
+
Out[1]:
@@ -411,8 +407,68 @@

Muliple Y-Axes Subplots +
+
+
In [2]:
+
+
+
from IPython.display import IFrame
+IFrame(src= "https://dash-simple-apps.plotly.host/dash-multipleaxesplot/", width="100%", height="650px", frameBorder="0")
+
+ +
+
+
+ +
+
+ + +
+ +
Out[2]:
+ + + +
+ + + +
+ +
+
+
+ +
+
+
+
In [ ]:
+
+
Find the dash app source code [here](https://github.com/plotly/simple-example-chart-apps/tree/master/Maps)
+
+ +
+
+
+ +
+
+

Reference

All of the y-axis properties are found here: https://plot.ly/python/reference/#YAxis

diff --git a/_posts/python/subplots/multiple-axes/multiple-axes.ipynb b/_posts/python/subplots/multiple-axes/multiple-axes.ipynb index 335eb5880d9c..64297c2c62e7 100644 --- a/_posts/python/subplots/multiple-axes/multiple-axes.ipynb +++ b/_posts/python/subplots/multiple-axes/multiple-axes.ipynb @@ -364,6 +364,52 @@ "py.iplot(fig, filename='multiple-y-axes-subplots')" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Dash Example" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from IPython.display import IFrame\n", + "IFrame(src= \"https://dash-simple-apps.plotly.host/dash-multipleaxesplot/\", width=\"100%\", height=\"650px\", frameBorder=\"0\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Find the dash app source code [here](https://github.com/plotly/simple-example-chart-apps/tree/master/multipleaxes)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -374,7 +420,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -406,18 +452,16 @@ "output_type": "stream", "text": [ "Collecting git+https://github.com/plotly/publisher.git\n", - " Cloning https://github.com/plotly/publisher.git to /tmp/pip-req-build-ked55o5t\n", + " Cloning https://github.com/plotly/publisher.git to /private/var/folders/s5/vjqn03zs7nn8zs_fwzcf14r40000gn/T/pip-req-build-hqf0vgv4\n", "Building wheels for collected packages: publisher\n", - " Running setup.py bdist_wheel for publisher ... \u001b[?25ldone\n", - "\u001b[?25h Stored in directory: /tmp/pip-ephem-wheel-cache-ruczy7sv/wheels/99/3e/a0/fbd22ba24cca72bdbaba53dbc23c1768755fb17b3af0f33966\n", + " Building wheel for publisher (setup.py) ... \u001b[?25ldone\n", + "\u001b[?25h Stored in directory: /private/var/folders/s5/vjqn03zs7nn8zs_fwzcf14r40000gn/T/pip-ephem-wheel-cache-4fs91q4x/wheels/99/3e/a0/fbd22ba24cca72bdbaba53dbc23c1768755fb17b3af0f33966\n", "Successfully built publisher\n", "Installing collected packages: publisher\n", " Found existing installation: publisher 0.13\n", " Uninstalling publisher-0.13:\n", " Successfully uninstalled publisher-0.13\n", - "Successfully installed publisher-0.13\n", - "\u001b[33mYou are using pip version 10.0.1, however version 19.0.3 is available.\n", - "You should consider upgrading via the 'pip install --upgrade pip' command.\u001b[0m\n" + "Successfully installed publisher-0.13\n" ] } ], @@ -438,15 +482,6 @@ " display_as='multiple_axes', order=1,\n", " ipynb='~notebook_demo/270')\n" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [] } ], "metadata": { @@ -465,7 +500,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.5" + "version": "3.7.2" } }, "nbformat": 4,