Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a4fd91f

Browse files
committed
Merge branch 'source' of https://github.com/plotly/documentation into issues-fixing
2 parents 4cbf8a8 + 9884dba commit a4fd91f

33 files changed

+5358
-78
lines changed

_config_dev.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ staticurl: http://localhost:4000/all_static
88
# all of the posts: ['*.Rmd','_posts/2015-09-09-matlab-reference.html','_posts/2015-09-06-r-reference.html','_posts/2015-09-06-python-reference.html','_posts/2015-08-19-plotly_js-reference.html','_posts/2015-04-05-ggplot2-index.html','_posts/2015-04-05-julia-index.html','_posts/2015-04-05-matlab-index.html','_posts/2015-04-05-matplotlib-index.html','_posts/2015-04-05-node_js-index.html','_posts/2015-04-05-plotly_js-index.html','_posts/2015-04-05-plotlyjs-function-reference.md','_posts/2015-04-05-python-index.html','_posts/2015-05-25-ipython-notebooks_gallery.html','_posts/2015-05-25-ipython-notebooks_index.html','_posts/2015-07-13-eula_index.html','_posts/2015-07-19-pandas.html','_posts/2015-07-26-index.html','_posts/2015-07-30-r-index.Rmd','_posts/2015-07-30-r-index.md','_posts/2015-08-20-research-box-index.html','_posts/ggplot2','_posts/julia','_posts/matlab','_posts/matplotlib','_posts/nodejs','_posts/pandas','_posts/plotly_js','_posts/python','_posts/r','_posts/tutorials','_posts/user_guide_matlab','_posts/user_guide_python']
99
exclude: ['*.Rmd','_posts/2015-09-09-matlab-reference.html','_posts/2015-09-06-r-reference.html','_posts/2015-09-06-python-reference.html','_posts/2015-08-19-plotly_js-reference.html','_posts/2015-04-05-ggplot2-index.html','_posts/2015-04-05-julia-index.html','_posts/2015-04-05-matlab-index.html','_posts/2015-04-05-matplotlib-index.html','_posts/2015-04-05-node_js-index.html','_posts/2015-04-05-plotly_js-index.html','_posts/2015-04-05-plotlyjs-function-reference.md','_posts/2015-04-05-python-index.html','_posts/2015-05-25-ipython-notebooks_gallery.html','_posts/2015-05-25-ipython-notebooks_index.html','_posts/2015-07-13-eula_index.html','_posts/2015-07-19-pandas.html','_posts/2015-07-26-index.html','_posts/2015-07-30-r-index.Rmd','_posts/2015-07-30-r-index.md','_posts/2015-08-20-research-box-index.html','_posts/ggplot2','_posts/julia','_posts/matlab','_posts/matplotlib','_posts/nodejs','_posts/pandas','_posts/plotly_js','_posts/python','_posts/r','_posts/tutorials','_posts/user_guide_matlab',]
1010

11-
1211
plotlyjs_download_url: https://cdn.plot.ly/plotly-latest.min.js
1312
imgurl: https://images.plot.ly/plotly-documentation/
1413

_posts/matplotlib/annotations/2015-04-09-mpl-simple-annotation.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import numpy as np
1313

1414
import plotly.plotly as py
15+
import plotly.tools as tls
1516
# Learn about API authentication here: https://plot.ly/python/getting-started
1617
# Find your api_key here: https://plot.ly/settings/api
1718

@@ -21,7 +22,7 @@
2122
s = np.cos(2*np.pi*t)
2223
line, = plt.plot(t, s, lw=2)
2324

24-
plt.annotate('local max', xy=(2, 1), xytext=(3, 1.5),
25+
plt.annotate('local max', xy=(2, 1), xytext=(2.9, 1.1),
2526
arrowprops=dict(facecolor='black', shrink=0.05))
2627

2728
plt.ylim(-2,2)

_posts/matplotlib/axes/2016-02-08-axes-equal.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import plotly.plotly as py
1616
import plotly.tools as tls
17-
# Learn about API authenti
17+
# Learn about API authentication here: https://plot.ly/python/getting-started
1818
# Find your api_key here: https://plot.ly/settings/api
1919

2020
# Plot circle or radius 3

_posts/matplotlib/axes/2016-02-08-axes-font.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
line, = ax.plot(t, s, lw=2)
2525

2626
ax.set_title("My Plot Title")
27-
ax.set_xlabel("This is X Axis label, with fontsize=16", fontsize=18)
28-
ax.set_ylabel("This is Y Axis, with fontsize=16", fontsize=16)
27+
ax.set_xlabel("This is X Axis label with fontsize=16", fontsize=18)
28+
ax.set_ylabel("This is Y Axis with fontsize=16", fontsize=16)
2929

3030
plotly_fig = tls.mpl_to_plotly( mpl_fig )
3131

_posts/matplotlib/axes/2016-02-08-axes-label.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
line, = ax.plot(x, y, lw=2)
2727

2828
ax.set_title("My Plot Title")
29-
ax.set_xlabel("This is X Axis")
30-
ax.set_ylabel("This is Y Axis")
29+
ax.set_xlabel("This is the X Axis")
30+
ax.set_ylabel("This is the Y Axis")
3131

3232
plotly_fig = tls.mpl_to_plotly( mpl_fig )
3333
plot_url = py.plot_mpl(plotly_fig, filename='mpl-axes-labels')

_posts/matplotlib/axes/2016-02-15-setting-axes-limits.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import numpy as np
1313

1414
import plotly.plotly as py
15-
15+
import plotly.tools as tls
1616
# Learn about API authentication here: https://plot.ly/python/getting-started
1717
# Find your api_key here: https://plot.ly/settings/api
1818

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Setting the XTICKS and YTicks Font size and angle
3+
plot_url: https://plot.ly/~tarzzz/1380
4+
arrangement: horizontal
5+
language: matplotlib
6+
suite: axes
7+
order: 4
8+
sitemap: false
9+
---
10+
11+
import matplotlib.pyplot as plt
12+
import numpy as np
13+
14+
import plotly.plotly as py
15+
import plotly.tools as tls
16+
# Learn about API authentication here: https://plot.ly/python/getting-started
17+
# Find your api_key here: https://plot.ly/settings/api
18+
19+
20+
mpl_fig = plt.figure()
21+
ax = mpl_fig.add_subplot(111)
22+
23+
x=[0, 1, 2, 3, 4, 5, 6, 7, 8]
24+
y=[0, 4, 5, 1, 8, 5, 3, 2, 9]
25+
26+
line, = ax.plot(x, y, lw=2)
27+
28+
plotly_fig = tls.mpl_to_plotly( mpl_fig )
29+
30+
31+
32+
plotly_fig['layout']['xaxis1'].update({'ticktext': ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight'],
33+
'tickvals': [0, 1, 2, 3, 4, 5, 6, 7, 8],
34+
'tickfont': {'size': 14, 'family':'Courier New, monospace'},
35+
'tickangle': 60
36+
})
37+
38+
plotly_fig['layout']['yaxis1'].update({'ticktext': ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'],
39+
'tickvals': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
40+
'tickfont': {'size': 14, 'family':'Courier New, monospace'},
41+
'tickangle': 60
42+
})
43+
44+
plot_url = py.plot(plotly_fig, filename='mpl-custom-xticks-yticks')
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Matplotlib Twinx - Graph with two Y Axes
3+
plot_url: https://plot.ly/~tarzzz/1374
4+
arrangement: horizontal
5+
language: matplotlib
6+
suite: axes
7+
order: 3
8+
sitemap: false
9+
---
10+
11+
import matplotlib.pyplot as plt
12+
import numpy as np
13+
14+
import plotly.plotly as py
15+
import plotly.tools as tls
16+
# Learn about API authentication here: https://plot.ly/python/getting-started
17+
# Find your api_key here: https://plot.ly/settings/api
18+
19+
20+
x=[1, 2, 3, 4, 5]
21+
y=[2, 4, 7, 9, 5]
22+
23+
y1=[20, 45, 79, 90, 190]
24+
plt.plot(x,y, color="r")
25+
plt.plot(x,y1, color="b")
26+
fig = plt.gcf()
27+
28+
29+
plotly_fig = tls.mpl_to_plotly(fig)
30+
plotly_fig['data'][0].update({'name':'YAxis1 Data'})
31+
plotly_fig['data'][1].update({'yaxis':'y2', 'name':'YAxis2 Data'})
32+
33+
plotly_fig['layout'].update(yaxis=dict(title='Y Axis1',
34+
titlefont=dict(color='rgb(255, 0, 0)'),
35+
tickfont=dict(color='rgb(255, 0, 0)'),
36+
side='left')
37+
)
38+
39+
plotly_fig['layout'].update(yaxis2=dict(title='Y Axis2',
40+
titlefont=dict(color='rgb(0, 0, 255)'),
41+
tickfont=dict(color='rgb(0, 0, 255)'),
42+
overlaying='y',side='right')
43+
)
44+
45+
plotly_fig['layout']['showlegend'] = True
46+
plot_url = py.plot(plotly_fig, filename='mpl-two-y-axis')

_posts/matplotlib/heatmap/2016-02-08-heatmap-basic.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
order: 1
88
sitemap: false
99
---
10-
1110
import matplotlib.pyplot as plt
1211
import numpy as np
1312

@@ -16,7 +15,6 @@
1615
# Learn about API authentication here: https://plot.ly/python/getting-started
1716
# Find your api_key here: https://plot.ly/settings/api
1817

19-
2018
fig = plt.figure()
2119
ax = fig.add_subplot(111)
2220

_posts/matplotlib/heatmap/2016-02-08-heatmap-custom-colorscale.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
order: 2
88
sitemap: false
99
---
10-
1110
import matplotlib.pyplot as plt
1211
import numpy as np
1312

1413
import plotly.plotly as py
1514
import plotly.tools as tls
1615
# Learn about API authentication here: https://plot.ly/python/getting-started
1716
# Find your api_key here: https://plot.ly/settings/api
17+
1818
fig = plt.figure()
1919
ax = fig.add_subplot(111)
2020

0 commit comments

Comments
 (0)