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 @@
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 referencepython
figure reference
- 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()
python
figure referencematlab
figure reference