diff --git a/_posts/python/layout/labels/2015-04-09-labels_python_index.html b/_posts/python/layout/labels/2015-04-09-labels_python_index.html deleted file mode 100755 index 0e73db36a3ef..000000000000 --- a/_posts/python/layout/labels/2015-04-09-labels_python_index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Setting the Title, Legend Entries, and Axis Titles in Python | Examples | Plotly -name: Setting the Title, Legend Entries, and Axis Titles -permalink: python/figure-labels/ -description: How to set the title, legend-entries, and axis-titles in python. -layout: base -thumbnail: thumbnail/labels.jpg -language: python -page_type: example_index -has_thumbnail: false -display_as: layout_opt ---- -{% assign examples = site.posts | where:"language","python" | where:"suite","labels" | sort: "order" %} -{% include auto_examples.html examples=examples %} diff --git a/_posts/python/layout/labels/2015-04-09-styling-names.html b/_posts/python/layout/labels/2015-04-09-styling-names.html deleted file mode 100755 index 45797c2ec0de..000000000000 --- a/_posts/python/layout/labels/2015-04-09-styling-names.html +++ /dev/null @@ -1,47 +0,0 @@ ---- -name: Styling Axes Labels -plot_url: https://plot.ly/~PlotBot/17 -arrangement: horizontal -language: python -suite: labels -order: 0 -sitemap: false ---- -# Learn about API authentication here: https://plot.ly/python/getting-started -# Find your api_key here: https://plot.ly/settings/api - -import plotly.plotly as py -import plotly.graph_objs as go - -trace1 = go.Scatter( - x=[0, 1, 2, 3, 4, 5, 6, 7, 8], - y=[0, 1, 2, 3, 4, 5, 6, 7, 8], - name='Name of Trace 1' -) -trace2 = go.Scatter( - x=[0, 1, 2, 3, 4, 5, 6, 7, 8], - y=[1, 0, 3, 2, 5, 4, 7, 6, 8], - name='Name of Trace 2' -) -data = [trace1, trace2] -layout = go.Layout( - title='Plot Title', - xaxis=dict( - title='x Axis', - titlefont=dict( - family='Courier New, monospace', - size=18, - color='#7f7f7f' - ) - ), - yaxis=dict( - title='y Axis', - titlefont=dict( - family='Courier New, monospace', - size=18, - color='#7f7f7f' - ) - ) -) -fig = go.Figure(data=data, layout=layout) -plot_url = py.plot(fig, filename='styling-names') diff --git a/_posts/python/layout/labels/2015-06-30-labels.html b/_posts/python/layout/labels/2015-06-30-labels.html new file mode 100644 index 000000000000..f6467c503797 --- /dev/null +++ b/_posts/python/layout/labels/2015-06-30-labels.html @@ -0,0 +1,157 @@ +--- +permalink: python/figure-labels/ +description: How to set the title, legend-entries, and axis-titles in python. +name: Setting the Title, Legend Entries, and Axis Titles in Python | Examples | Plotly +has_thumbnail: true +thumbnail: thumbnail/labels.jpg +title: Setting the Title, Legend Entries, and Axis Titles in Python | Examples | Plotly +name: Setting the Title, Legend Entries, and Axis Titles +language: python +page_type: example_index +has_thumbnail: false +display_as: layout_opt +order: 0.5 +ipynb: ~notebook_demo/271 +layout: user-guide +--- +{% raw %} +
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.
+
We also have a quick-reference cheatsheet (new!) to help you get started!
Plotly's Python API is updated frequently. Run pip install plotly --upgrade to update your Plotly version.
+ +import plotly
+plotly.__version__
+
import plotly.plotly as py
+import plotly.graph_objs as go
+
+trace1 = go.Scatter(
+ x=[0, 1, 2, 3, 4, 5, 6, 7, 8],
+ y=[0, 1, 2, 3, 4, 5, 6, 7, 8],
+ name='Name of Trace 1'
+)
+trace2 = go.Scatter(
+ x=[0, 1, 2, 3, 4, 5, 6, 7, 8],
+ y=[1, 0, 3, 2, 5, 4, 7, 6, 8],
+ name='Name of Trace 2'
+)
+data = [trace1, trace2]
+layout = go.Layout(
+ title=go.layout.Title(
+ text='Plot Title',
+ xref='paper',
+ x=0
+ ),
+ xaxis=go.layout.XAxis(
+ title=go.layout.xaxis.Title(
+ text='x Axis',
+ font=dict(
+ family='Courier New, monospace',
+ size=18,
+ color='#7f7f7f'
+ )
+ )
+ ),
+ yaxis=go.layout.YAxis(
+ title=go.layout.yaxis.Title(
+ text='y Axis',
+ font=dict(
+ family='Courier New, monospace',
+ size=18,
+ color='#7f7f7f'
+ )
+ )
+ )
+)
+fig = go.Figure(data=data, layout=layout)
+py.iplot(fig, filename='styling-names')
+
See https://plot.ly/python/reference/#layout for more information!
+ +