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

Skip to content

Commit d63c6d7

Browse files
Merge pull request plotly#1418 from plotly/cleanup
Cleanup
2 parents fb17785 + bb37bea commit d63c6d7

10 files changed

+47
-52
lines changed

_data/cache_bust_css.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
e37c5d56b6d30ee1a2bb50451a2bd902 ../all_static/css/main.css
1+
8b86aae596ebea1f9390d418020df20a ../all_static/css/main.css
22
a5765df8bc2358dd61c19edcc0cbef7d ../all_static/css/normalize.css

_includes/breadcrumb.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<path fill="#000000" d="M2.6,10.59L8.38,4.8L10.07,6.5C9.83,7.35 10.22,8.28 11,8.73V14.27C10.4,14.61 10,15.26 10,16A2,2 0 0,0 12,18A2,2 0 0,0 14,16C14,15.26 13.6,14.61 13,14.27V9.41L15.07,11.5C15,11.65 15,11.82 15,12A2,2 0 0,0 17,14A2,2 0 0,0 19,12A2,2 0 0,0 17,10C16.82,10 16.65,10 16.5,10.07L13.93,7.5C14.19,6.57 13.71,5.55 12.78,5.16C12.35,5 11.9,4.96 11.5,5.07L9.8,3.38L10.59,2.6C11.37,1.81 12.63,1.81 13.41,2.6L21.4,10.59C22.19,11.37 22.19,12.63 21.4,13.41L13.41,21.4C12.63,22.19 11.37,22.19 10.59,21.4L2.6,13.41C1.81,12.63 1.81,11.37 2.6,10.59Z"></path>
6969
</svg>
7070
</div>
71-
<span>Fork on GitHub</span>
71+
<span>Edit this page on GitHub</span>
7272
</a>
7373
</div>
7474
</section>

_includes/plotschema-reference.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{% endif %}
1919
{% capture graph_object %}{{ graph_object | replace: '_', ' ') | capitalize_all | replace: ' ', '' |
2020
replace: '2d', '2D' | replace: '3d' : '3D'}}{% endcapture %}
21-
<code>import plotly.graph_objs as go</code><br><code>go.{{ graph_object }}</code><br>
21+
<code>import plotly.graph_objects as go</code><br><code>go.{{ graph_object }}</code><br>
2222
A <code>{{ graph_object }}</code> trace is a graph object with any of the named arguments or attributes
2323
listed below.
2424
{% elsif page.language == "r" %}

_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' %}

all_static/css/main.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8065,7 +8065,7 @@ pre {
80658065
.page--single .tutorial-content strong {
80668066
display: inline !important; }
80678067
.page--single .tutorial-content p, .page--single .tutorial-content section.section div.content-box, section.section .page--single .tutorial-content div.content-box {
8068-
padding: 15px;
8068+
padding: 10px;
80698069
margin: 0;
80708070
position: relative; }
80718071
.page--single .tutorial-content p img, .page--single .tutorial-content section.section div.content-box img, section.section .page--single .tutorial-content div.content-box img {
@@ -8274,7 +8274,7 @@ main.getting-started *[class*="-download"].button {
82748274
text-decoration: none; }
82758275

82768276
main.getting-started h4, main.getting-started .js-splash--section-title {
8277-
margin: 20px 0 !important;
8277+
margin: 20px 0;
82788278
-webkit-box-align: center;
82798279
-webkit-align-items: center;
82808280
-ms-flex-align: center;

scss/_pages/_getting-started.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ main.getting-started {
2323
text-decoration: none;
2424
}
2525
h4 {
26-
margin: $unit*2 0 !important;
26+
margin: $unit*2 0;
2727
align-items: center;
2828
}
2929
h2 {
@@ -74,4 +74,4 @@ h2#getting-started{
7474
div.icon{
7575
display: none;
7676
}
77-
}
77+
}

scss/_pages/_tutorial-single.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pre {
4646
//background: $lb;
4747
//display: flex;
4848
//flex-wrap:wrap;
49-
padding: 15px;
49+
padding: 10px;
5050
margin: 0;
5151
position: relative;
5252
img {

0 commit comments

Comments
 (0)