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

Skip to content

Commit 3444892

Browse files
fix warnings
1 parent 6d7867d commit 3444892

File tree

4 files changed

+39
-44
lines changed

4 files changed

+39
-44
lines changed

_posts/reference_pages/2015-08-19-plotly_js-reference.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ <h2><code>plotly.js</code> figure reference</h2>
6969
</div>
7070
</div>
7171

72-
{% assign quote='"' %}
72+
{% assign quote='"' %}
7373
{% assign array='array' %}
7474
{% assign arrays='arrays' %}
75-
{% assign object='object' %}
75+
{% assign object='object' %}
7676
{% assign 2darray='2D array' %}
7777
{% assign data_array='data array' %}
7878
{% assign truestring='true' %}

_posts/reference_pages/2015-09-06-python-reference.html

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,52 +13,47 @@ <h2><code>python</code> figure reference</h2>
1313
<summary>How are Plotly attributes organized?</summary>
1414
<div class="row">
1515
<p>
16-
<code>plotly</code> charts are described <i>declaratively</i> with objects in <code>plotly.graph_objs</code> and <code>dict</code>. Every aspect of a plotly chart (the colors, the grids, the data, and so on) has a corresponding key-value attribute in these objects. This page contains an extensive list of these attributes.<br><br>
16+
<code>plotly</code> charts are described <i>declaratively</i> with objects in <code>plotly.graph_objects</code> and <code>dict</code>. Every aspect of a plotly chart (the colors, the grids, the data, and so on) has a corresponding key-value attribute in these objects. This page contains an extensive list of these attributes.<br><br>
1717

1818
Plotly's graph description places attributes into two categories: traces (objects that describe a single series of data in a graph like <code>Scatter</code> or <code>Heatmap</code>) and <code>layout</code> attributes that apply to the rest of the chart, like the <code>title</code>, <code>xaxis</code>, or <code>annotations</code>).<br><br>
1919

2020
Here is a simple example of a plotly chart inlined with links to each attribute's reference section.
2121

22-
<pre>import plotly
23-
import plotly.plotly as py
24-
import plotly.graph_objs as go
22+
<pre>
23+
import plotly.graph_objects as go
2524

26-
print plotly.__version__ # At least 1.8.6 is required. Upgrade with: $ pip install plotly --upgrade
27-
28-
data = [
29-
go.Scatter( # all "scatter" attributes: <a href="#scatter">{{ site.BASE_URL }}/python/reference/#scatter</a>
30-
x=[1, 2, 3], # more about "x": <a href="#scatter-x">/python/reference/#scatter-x</a>
31-
y=[3, 1, 6], # more about "y": <a href="#scatter-y">/python/reference/#scatter-y</a>
32-
marker=dict( # marker is an dict, marker keys: <a href="#scatter-marker">/python/reference/#scatter-marker</a>
33-
color="rgb(16, 32, 77)" # more about marker's "color": <a href="#scatter-marker-color">/python/reference/#scatter-marker-color</a>
34-
)
35-
),
36-
go.Bar( # all "bar" chart attributes: <a href="#bar">/python/reference/#bar</a>
37-
x=[1, 2, 3], # more about "x": <a href="#bar-x">/python/reference/#bar-x</a>
38-
y=[3, 1, 6], # <a href="#bar-x">/python/reference/#bar-y</a>
39-
name="bar chart example" # <a href="#bar-x">/python/reference/#bar-name</a>
25+
fig = go.Figure([
26+
go.Scatter( # all "scatter" attributes: <a href="#scatter">{{ site.BASE_URL }}/python/reference/#scatter</a>
27+
x=[1, 2, 3], # more about "x": <a href="#scatter-x">/python/reference/#scatter-x</a>
28+
y=[3, 1, 6], # more about "y": <a href="#scatter-y">/python/reference/#scatter-y</a>
29+
marker=dict( # marker is an dict, marker keys: <a href="#scatter-marker">/python/reference/#scatter-marker</a>
30+
color="rgb(16, 32, 77)" # more about marker's "color": <a href="#scatter-marker-color">/python/reference/#scatter-marker-color</a>
4031
)
41-
]
42-
43-
layout = go.Layout( # all "layout" attributes: <a href="#layout">/python/reference/#layout</a>
44-
title="simple example", # more about "layout's" "title": <a href="#layout-title">/python/reference/#layout-title</a>
45-
xaxis=dict( # all "layout's" "xaxis" attributes: <a href="#layout-xaxis">/python/reference/#layout-xaxis</a>
46-
title="time" # more about "layout's" "xaxis's" "title": <a href="#layout-xaxis-title">/python/reference/#layout-xaxis-title</a>
47-
),
48-
annotations=[
49-
dict( # all "annotation" attributes: <a href="#layout-annotations">/python/reference/#layout-annotations</a>
50-
text="simple annotation", # <a href="#layout-annotations-text">/python/reference/#layout-annotations-text</a>
51-
x=0, # <a href="#layout-annotations-x">/python/reference/#layout-annotations-x</a>
52-
xref="paper", # <a href="#layout-annotations-xref">/python/reference/#layout-annotations-xref</a>
53-
y=0, # <a href="#layout-annotations-y">/python/reference/#layout-annotations-y</a>
54-
yref="paper" # <a href="#layout-annotations-yref">/python/reference/#layout-annotations-yref</a>
55-
)
56-
]
32+
),
33+
go.Bar( # all "bar" chart attributes: <a href="#bar">/python/reference/#bar</a>
34+
x=[1, 2, 3], # more about "x": <a href="#bar-x">/python/reference/#bar-x</a>
35+
y=[3, 1, 6], # <a href="#bar-x">/python/reference/#bar-y</a>
36+
name="bar chart example" # <a href="#bar-x">/python/reference/#bar-name</a>
5737
)
38+
])
5839

59-
figure = go.Figure(data=data, layout=layout)
40+
fig.update_layout( # all "layout" attributes: <a href="#layout">/python/reference/#layout</a>
41+
title="simple example", # more about "layout's" "title": <a href="#layout-title">/python/reference/#layout-title</a>
42+
xaxis=dict( # all "layout's" "xaxis" attributes: <a href="#layout-xaxis">/python/reference/#layout-xaxis</a>
43+
title="time" # more about "layout's" "xaxis's" "title": <a href="#layout-xaxis-title">/python/reference/#layout-xaxis-title</a>
44+
),
45+
annotations=[
46+
dict( # all "annotation" attributes: <a href="#layout-annotations">/python/reference/#layout-annotations</a>
47+
text="simple annotation", # <a href="#layout-annotations-text">/python/reference/#layout-annotations-text</a>
48+
x=0, # <a href="#layout-annotations-x">/python/reference/#layout-annotations-x</a>
49+
xref="paper", # <a href="#layout-annotations-xref">/python/reference/#layout-annotations-xref</a>
50+
y=0, # <a href="#layout-annotations-y">/python/reference/#layout-annotations-y</a>
51+
yref="paper" # <a href="#layout-annotations-yref">/python/reference/#layout-annotations-yref</a>
52+
)
53+
]
54+
)
6055

61-
py.plot(figure, filename='api-docs/reference-graph')</pre>
56+
fig.show()</pre>
6257
</p>
6358
<hr>
6459
</div>
@@ -75,10 +70,10 @@ <h2><code>python</code> figure reference</h2>
7570
</div>
7671
</div>
7772

78-
{% assign quote='"' %}
73+
{% assign quote='"' %}
7974
{% assign array='list' %}
8075
{% assign arrays='lists' %}
81-
{% assign object='dict' %}
76+
{% assign object='dict' %}
8277
{% assign 2darray='2D list' %}
8378
{% assign data_array='data array' %}
8479
{% assign truestring='True' %}

_posts/reference_pages/2015-09-06-r-reference.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ <h2>R figure reference</h2>
6363
</div>
6464
</div>
6565

66-
{% assign quote='"' %}
66+
{% assign quote='"' %}
6767
{% assign array='list' %}
6868
{% assign arrays='lists' %}
69-
{% assign object='named list' %}
69+
{% assign object='named list' %}
7070
{% assign 2darray='2D list' %}
7171
{% assign data_array='dataframe column, list, vector' %}
7272
{% assign truestring='TRUE' %}

_posts/reference_pages/2015-09-09-matlab-reference.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ <h2><code>matlab</code> figure reference</h2>
9797
</div>
9898
</div>
9999

100-
{% assign quote="'" %}
100+
{% assign quote="'" %}
101101
{% assign array='cell array' %}
102102
{% assign arrays='cell arrays' %}
103-
{% assign object='struct' %}
103+
{% assign object='struct' %}
104104
{% assign 2darray='matrix' %}
105105
{% assign data_array='array' %}
106106
{% assign truestring='true' %}

0 commit comments

Comments
 (0)