diff --git a/_data/cache_bust_css.yml b/_data/cache_bust_css.yml index 835d6af75382..7ea965143a62 100644 --- a/_data/cache_bust_css.yml +++ b/_data/cache_bust_css.yml @@ -1,2 +1,2 @@ -e37c5d56b6d30ee1a2bb50451a2bd902 ../all_static/css/main.css +8b86aae596ebea1f9390d418020df20a ../all_static/css/main.css a5765df8bc2358dd61c19edcc0cbef7d ../all_static/css/normalize.css diff --git a/_includes/breadcrumb.html b/_includes/breadcrumb.html index cab1ef9ed986..f3db3f7b75ce 100755 --- a/_includes/breadcrumb.html +++ b/_includes/breadcrumb.html @@ -68,7 +68,7 @@ - Fork on GitHub + Edit this page on GitHub diff --git a/_includes/plotschema-reference.html b/_includes/plotschema-reference.html index 24ecbe7d0ba0..b17f2ab22706 100644 --- a/_includes/plotschema-reference.html +++ b/_includes/plotschema-reference.html @@ -18,7 +18,7 @@ {% endif %} {% capture graph_object %}{{ graph_object | replace: '_', ' ') | capitalize_all | replace: ' ', '' | replace: '2d', '2D' | replace: '3d' : '3D'}}{% endcapture %} - import plotly.graph_objs as go
go.{{ graph_object }}
+ import plotly.graph_objects as go
go.{{ graph_object }}
A {{ graph_object }} trace is a graph object with any of the named arguments or attributes listed below. {% elsif page.language == "r" %} diff --git a/_posts/reference_pages/2015-08-19-plotly_js-reference.html b/_posts/reference_pages/2015-08-19-plotly_js-reference.html index 83c6c9794a64..7eb2cbf95dfd 100644 --- a/_posts/reference_pages/2015-08-19-plotly_js-reference.html +++ b/_posts/reference_pages/2015-08-19-plotly_js-reference.html @@ -69,10 +69,10 @@

plotly.js figure reference

-{% assign quote='"' %} +{% assign quote='"' %} {% assign array='array' %} {% assign arrays='arrays' %} -{% assign object='object' %} +{% assign object='object' %} {% assign 2darray='2D array' %} {% assign data_array='data array' %} {% assign truestring='true' %} diff --git a/_posts/reference_pages/2015-09-06-python-reference.html b/_posts/reference_pages/2015-09-06-python-reference.html index 35ab5b636b01..69e9576e0fa8 100644 --- a/_posts/reference_pages/2015-09-06-python-reference.html +++ b/_posts/reference_pages/2015-09-06-python-reference.html @@ -13,52 +13,47 @@

python figure reference

How are Plotly attributes organized?

- plotly charts are described declaratively with objects in plotly.graph_objs and dict. 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.

+ plotly charts are described declaratively with objects in plotly.graph_objects and dict. 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.

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

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

import plotly
-    import plotly.plotly as py
-    import plotly.graph_objs as go
+    
+import plotly.graph_objects as go
 
-    print plotly.__version__                # At least 1.8.6 is required. Upgrade with: $ pip install plotly --upgrade
-
-    data = [
-        go.Scatter(                         # all "scatter" attributes: {{ site.BASE_URL }}/python/reference/#scatter
-            x=[1, 2, 3],                    # more about "x":  /python/reference/#scatter-x
-            y=[3, 1, 6],                    # more about "y":  /python/reference/#scatter-y
-            marker=dict(                    # marker is an dict, marker keys: /python/reference/#scatter-marker
-                color="rgb(16, 32, 77)"     # more about marker's "color": /python/reference/#scatter-marker-color
-            )
-        ),
-        go.Bar(                         # all "bar" chart attributes: /python/reference/#bar
-            x=[1, 2, 3],                # more about "x": /python/reference/#bar-x
-            y=[3, 1, 6],                # /python/reference/#bar-y
-            name="bar chart example"    # /python/reference/#bar-name
+fig = go.Figure([
+    go.Scatter(                         # all "scatter" attributes: {{ site.BASE_URL }}/python/reference/#scatter
+        x=[1, 2, 3],                    # more about "x":  /python/reference/#scatter-x
+        y=[3, 1, 6],                    # more about "y":  /python/reference/#scatter-y
+        marker=dict(                    # marker is an dict, marker keys: /python/reference/#scatter-marker
+            color="rgb(16, 32, 77)"     # more about marker's "color": /python/reference/#scatter-marker-color
         )
-    ]
-
-    layout = go.Layout(             # all "layout" attributes: /python/reference/#layout
-        title="simple example",     # more about "layout's" "title": /python/reference/#layout-title
-        xaxis=dict(                 # all "layout's" "xaxis" attributes: /python/reference/#layout-xaxis
-            title="time"            # more about "layout's" "xaxis's" "title": /python/reference/#layout-xaxis-title
-        ),
-        annotations=[
-            dict(                            # all "annotation" attributes: /python/reference/#layout-annotations
-                text="simple annotation",    # /python/reference/#layout-annotations-text
-                x=0,                         # /python/reference/#layout-annotations-x
-                xref="paper",                # /python/reference/#layout-annotations-xref
-                y=0,                         # /python/reference/#layout-annotations-y
-                yref="paper"                 # /python/reference/#layout-annotations-yref
-            )
-        ]
+    ),
+    go.Bar(                         # all "bar" chart attributes: /python/reference/#bar
+        x=[1, 2, 3],                # more about "x": /python/reference/#bar-x
+        y=[3, 1, 6],                # /python/reference/#bar-y
+        name="bar chart example"    # /python/reference/#bar-name
     )
+])
 
-    figure = go.Figure(data=data, layout=layout)
+fig.update_layout(             # all "layout" attributes: /python/reference/#layout
+    title="simple example",     # more about "layout's" "title": /python/reference/#layout-title
+    xaxis=dict(                 # all "layout's" "xaxis" attributes: /python/reference/#layout-xaxis
+        title="time"            # more about "layout's" "xaxis's" "title": /python/reference/#layout-xaxis-title
+    ),
+    annotations=[
+        dict(                            # all "annotation" attributes: /python/reference/#layout-annotations
+            text="simple annotation",    # /python/reference/#layout-annotations-text
+            x=0,                         # /python/reference/#layout-annotations-x
+            xref="paper",                # /python/reference/#layout-annotations-xref
+            y=0,                         # /python/reference/#layout-annotations-y
+            yref="paper"                 # /python/reference/#layout-annotations-yref
+        )
+    ]
+)
 
-    py.plot(figure, filename='api-docs/reference-graph')
+fig.show()


@@ -75,10 +70,10 @@

python figure reference

-{% assign quote='"' %} +{% assign quote='"' %} {% assign array='list' %} {% assign arrays='lists' %} -{% assign object='dict' %} +{% assign object='dict' %} {% assign 2darray='2D list' %} {% assign data_array='data array' %} {% assign truestring='True' %} diff --git a/_posts/reference_pages/2015-09-06-r-reference.html b/_posts/reference_pages/2015-09-06-r-reference.html index e0e64c15f8fe..d44a60d23810 100644 --- a/_posts/reference_pages/2015-09-06-r-reference.html +++ b/_posts/reference_pages/2015-09-06-r-reference.html @@ -63,10 +63,10 @@

R figure reference

-{% assign quote='"' %} +{% assign quote='"' %} {% assign array='list' %} {% assign arrays='lists' %} -{% assign object='named list' %} +{% assign object='named list' %} {% assign 2darray='2D list' %} {% assign data_array='dataframe column, list, vector' %} {% assign truestring='TRUE' %} diff --git a/_posts/reference_pages/2015-09-09-matlab-reference.html b/_posts/reference_pages/2015-09-09-matlab-reference.html index bd71edd2f5e9..dc241ec38db5 100644 --- a/_posts/reference_pages/2015-09-09-matlab-reference.html +++ b/_posts/reference_pages/2015-09-09-matlab-reference.html @@ -97,10 +97,10 @@

matlab figure reference

-{% assign quote="'" %} +{% assign quote="'" %} {% assign array='cell array' %} {% assign arrays='cell arrays' %} -{% assign object='struct' %} +{% assign object='struct' %} {% assign 2darray='matrix' %} {% assign data_array='array' %} {% assign truestring='true' %} diff --git a/all_static/css/main.css b/all_static/css/main.css index 629731040015..a0aa69d7f012 100644 --- a/all_static/css/main.css +++ b/all_static/css/main.css @@ -8065,7 +8065,7 @@ pre { .page--single .tutorial-content strong { display: inline !important; } .page--single .tutorial-content p, .page--single .tutorial-content section.section div.content-box, section.section .page--single .tutorial-content div.content-box { - padding: 15px; + padding: 10px; margin: 0; position: relative; } .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 { text-decoration: none; } main.getting-started h4, main.getting-started .js-splash--section-title { - margin: 20px 0 !important; + margin: 20px 0; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; diff --git a/scss/_pages/_getting-started.scss b/scss/_pages/_getting-started.scss index 439ac36e80b9..1ab930950573 100644 --- a/scss/_pages/_getting-started.scss +++ b/scss/_pages/_getting-started.scss @@ -23,7 +23,7 @@ main.getting-started { text-decoration: none; } h4 { - margin: $unit*2 0 !important; + margin: $unit*2 0; align-items: center; } h2 { @@ -74,4 +74,4 @@ h2#getting-started{ div.icon{ display: none; } -} \ No newline at end of file +} diff --git a/scss/_pages/_tutorial-single.scss b/scss/_pages/_tutorial-single.scss index e32366f3bbd7..c08d753c56d8 100644 --- a/scss/_pages/_tutorial-single.scss +++ b/scss/_pages/_tutorial-single.scss @@ -46,7 +46,7 @@ pre { //background: $lb; //display: flex; //flex-wrap:wrap; - padding: 15px; + padding: 10px; margin: 0; position: relative; img {