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 @@
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 @@
import plotly
+import plotly
plotly.__version__
-
import plotly.plotly as py
-import plotly.graph_objs as go
+import plotly.plotly as py
+import plotly.graph_objs as go
# Create random data with numpy
-import numpy as np
+import numpy as np
N = 500
random_x = np.linspace(0, 1, N)
@@ -102,7 +99,7 @@ Simple Line Plotpy.iplot(data, filename='basic-line')
-
import plotly.plotly as py
-import plotly.graph_objs as go
+import plotly.plotly as py
+import plotly.graph_objs as go
# Create random data with numpy
-import numpy as np
+import numpy as np
N = 100
random_x = np.linspace(0, 1, N)
@@ -175,7 +171,7 @@ Line Plot Modespy.iplot(data, filename='line-mode')
-
This example styles the color and dash of the traces, adds trace names, modifiys line width, and adds plot and axes titles.
@@ -214,8 +209,8 @@import plotly.plotly as py
-import plotly.graph_objs as go
+import plotly.plotly as py
+import plotly.graph_objs as go
# Add data
month = ['January', 'February', 'March', 'April', 'May', 'June', 'July',
@@ -292,7 +287,7 @@ Style Line Plotspy.iplot(fig, filename='styled-line')
-
import plotly.plotly as py
-import plotly.graph_objs as go
+import plotly.plotly as py
+import plotly.graph_objs as go
trace1 = go.Scatter(
x=[1, 2, 3, 4, 5,
6, 7, 8, 9, 10,
11, 12, 13, 14, 15],
- y=[10, 20, None, 15, 10,
- 5, 15, None, 20, 10,
+ y=[10, 20, None, 15, 10,
+ 5, 15, None, 20, 10,
10, 15, 25, 20, 10],
name = '<b>No</b> Gaps', # Style name/legend entry with html tags
- connectgaps=True
+ connectgaps=True
)
trace2 = go.Scatter(
x=[1, 2, 3, 4, 5,
6, 7, 8, 9, 10,
11, 12, 13, 14, 15],
- y=[5, 15, None, 10, 5,
- 0, 10, None, 15, 5,
+ y=[5, 15, None, 10, 5,
+ 0, 10, None, 15, 5,
5, 10, 20, 15, 5],
name = 'Gaps',
)
@@ -358,7 +352,7 @@ Connect Data Gapspy.iplot(fig, filename='simple-connectgaps')
-
import plotly.plotly as py
-import plotly.graph_objs as go
+import plotly.plotly as py
+import plotly.graph_objs as go
trace1 = go.Scatter(
x=[1, 2, 3, 4, 5],
@@ -473,7 +466,7 @@ Interpolation with Line Plotspy.iplot(fig, filename='line-shapes')
-
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')
-
import plotly.plotly as py
-import plotly.graph_objs as go
+import plotly.plotly as py
+import plotly.graph_objs as go
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
x_rev = x[::-1]
@@ -697,7 +688,7 @@ Filled Lines
fill='tozerox',
fillcolor='rgba(0,100,80,0.2)',
line=dict(color='rgba(255,255,255,0)'),
- showlegend=False,
+ showlegend=False,
name='Fair',
)
trace2 = go.Scatter(
@@ -707,7 +698,7 @@ Filled Lines
fillcolor='rgba(0,176,246,0.2)',
line=dict(color='rgba(255,255,255,0)'),
name='Premium',
- showlegend=False,
+ showlegend=False,
)
trace3 = go.Scatter(
x=x+x_rev,
@@ -715,7 +706,7 @@ Filled Lines
fill='tozerox',
fillcolor='rgba(231,107,243,0.2)',
line=dict(color='rgba(255,255,255,0)'),
- showlegend=False,
+ showlegend=False,
name='Fair',
)
trace4 = go.Scatter(
@@ -748,28 +739,28 @@ Filled Lines
xaxis=dict(
gridcolor='rgb(255,255,255)',
range=[1,10],
- showgrid=True,
- showline=False,
- showticklabels=True,
+ showgrid=True,
+ showline=False,
+ showticklabels=True,
tickcolor='rgb(127,127,127)',
ticks='outside',
- zeroline=False
+ zeroline=False
),
yaxis=dict(
gridcolor='rgb(255,255,255)',
- showgrid=True,
- showline=False,
- showticklabels=True,
+ showgrid=True,
+ showline=False,
+ showticklabels=True,
tickcolor='rgb(127,127,127)',
ticks='outside',
- zeroline=False
+ zeroline=False
),
)
fig = go.Figure(data=data, layout=layout)
py.iplot(fig, filename= 'shaded_lines')
-
from IPython.display import IFrame
+IFrame(src= "https://dash-simple-apps.plotly.host/dash-lineplot/", width="100%", height="650px", frameBorder="0")
+
See https://plot.ly/python/reference/#scatter for more information and chart attribute options!
+Find the dash app source code here
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 @@
Plotly's Python API is updated frequently. Run pip install plotly --upgrade to update your Plotly version.
@@ -44,7 +42,7 @@from IPython.display import IFrame
+IFrame(src= "https://dash-simple-apps.plotly.host/dash-figurelabelsplot/", width="100%", height="650px", frameBorder="0")
+
Find the dash app source code here
+ +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": [ + "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 @@
from IPython.display import IFrame
+IFrame(src= "https://dash-simple-apps.plotly.host/dash-multipleaxesplot/", width="100%", height="650px", frameBorder="0")
+
Find the dash app source code [here](https://github.com/plotly/simple-example-chart-apps/tree/master/Maps)
+
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": [ + "