Skip to content

Commit 57f96a1

Browse files
link up graph objects page
1 parent 2b2b775 commit 57f96a1

20 files changed

+42
-42
lines changed

doc/python/3d-scatter-plots.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ fig.update_layout(margin=dict(l=0, r=0, b=0, t=0))
7676

7777
#### Basic 3D Scatter Plot
7878

79-
If Plotly Express does not provide a good starting point, it is also possible to use the more generic `go.Scatter3D` from `plotly.graph_objs`.
79+
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Scatter3D` class from `plotly.graph_objects`](/python/graph-objects/).
8080
Like the [2D scatter plot](https://plotly.com/python/line-and-scatter/) `go.Scatter`, `go.Scatter3d` plots individual data in three-dimensional space.
8181

8282
```python
@@ -122,4 +122,4 @@ fig.show()
122122

123123
#### Reference
124124

125-
See https://plotly.com/python/reference/#scatter3d for more information and chart attribute options!
125+
See https://plotly.com/python/reference/#scatter3d for more information and chart attribute options!

doc/python/bar-charts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ To learn more, see the _link to px.bar reference page_.
9999

100100
#### Basic Bar Chart with plotly.graph_objects
101101

102-
If Plotly Express does not provide a good starting point, it is also possible to use the more generic `go.Bar` function from `plotly.graph_objects`.
102+
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Bar` class from `plotly.graph_objects`](/python/graph-objects/).
103103

104104
```python
105105
import plotly.graph_objects as go
@@ -386,4 +386,4 @@ See examples of horizontal bar charts [here](https://plotly.com/python/horizonta
386386

387387
### Reference
388388

389-
See https://plotly.com/python/reference/#bar for more information and chart attribute options!
389+
See https://plotly.com/python/reference/#bar for more information and chart attribute options!

doc/python/box-plots.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ fig.show()
134134

135135
## Box plot with go.Box
136136

137-
If Plotly Express does not provide a good starting point, it is also possible to use the more generic `go.Box` function from `plotly.graph_objects`. All available options for `go.Box` are described in the reference page https://plotly.com/python/reference/#box.
137+
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Box` class from `plotly.graph_objects`](/python/graph-objects/). All available options for `go.Box` are described in the reference page https://plotly.com/python/reference/#box.
138138

139139
### Basic Box Plot
140140

@@ -491,4 +491,4 @@ fig.show()
491491

492492
#### Reference
493493

494-
See https://plotly.com/python/reference/#box for more information and chart attribute options!
494+
See https://plotly.com/python/reference/#box for more information and chart attribute options!

doc/python/bubble-charts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fig.show()
5252

5353
## Bubble Chart with plotly.graph_objects
5454

55-
If Plotly Express does not provide a good starting point, it is also possible to use the more generic `go.Scatter` from `plotly.graph_objects`, and define the size of markers to create a bubble chart. All of the available options are described in the scatter section of the reference page: https://plotly.com/python/reference#scatter.
55+
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Scatter` class from `plotly.graph_objects`](/python/graph-objects/), and define the size of markers to create a bubble chart. All of the available options are described in the scatter section of the reference page: https://plotly.com/python/reference#scatter.
5656

5757
### Simple Bubble Chart
5858

@@ -222,4 +222,4 @@ fig.show()
222222

223223
### Reference
224224

225-
See https://plotly.com/python/reference/#scatter for more information and chart attribute options!
225+
See https://plotly.com/python/reference/#scatter for more information and chart attribute options!

doc/python/funnel-charts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fig.show()
6060

6161
### Basic Funnel Chart with graph_objects trace go.Funnel
6262

63-
If Plotly Express does not provide a good starting point, it is also possible to use the more generic `go.Funnel` function from `plotly.graph_objects`.
63+
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Funnel` class from `plotly.graph_objects`](/python/graph-objects/).
6464

6565
```python
6666
from plotly import graph_objects as go
@@ -138,7 +138,7 @@ fig.show()
138138

139139
### Basic Area Funnel Plot with go.Funnelarea
140140

141-
If Plotly Express does not provide a good starting point, it is also possible to use the more generic `go.Funnelarea` function from `plotly.graph_objects`.
141+
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Funnelarea` class from `plotly.graph_objects`](/python/graph-objects/).
142142

143143
```python
144144
from plotly import graph_objects as go
@@ -202,4 +202,4 @@ fig.show()
202202

203203
#### Reference
204204

205-
See https://plotly.com/python/reference/#funnel and https://plotly.com/python/reference/#funnelarea for more information and chart attribute options!
205+
See https://plotly.com/python/reference/#funnel and https://plotly.com/python/reference/#funnelarea for more information and chart attribute options!

doc/python/graph-objects.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ Graph objects have several benefits compared to plain Python dictionaries:
6060

6161
The recommended way to create figures is using the [functions in the plotly.express module](https://plotly.com/python-api-reference/), [collectively known as Plotly Express](/python/plotly-express/), which all return instances of `plotly.graph_objects.Figure`, so every figure produced with the plotly library, actually uses graph objects under the hood, unless manually constructed out of dictionaries.
6262

63-
That said, certain kinds of figures are not yet possible to create with Plotly Express, such as figures that use certain 3D trace-types like [`mesh`](/python/3d-mesh/) or [`isosurface`](/python/3d-isosurface-plots/). In addition, certain figures are cumbersome to create by starting from a figure created with Plotly Express, for example figures with [subplots of different types](/python/mixed-subplots/), [dual-axis plots](/python/multiple-axes/), or [faceted plots](/python/facet-plots/) with multiple different types of traces. To construct such figures, it can be easier to start from an empty `plotly.graph_objects.Figure` object (or one configured with subplots via the [make_subplots() function](/python/subplots/)) and progressively add traces and update attributes as above.
63+
That said, certain kinds of figures are not yet possible to create with Plotly Express, such as figures that use certain 3D trace-types like [`mesh`](/python/3d-mesh/) or [`isosurface`](/python/3d-isosurface-plots/). In addition, certain figures are cumbersome to create by starting from a figure created with Plotly Express, for example figures with [subplots of different types](/python/mixed-subplots/), [dual-axis plots](/python/multiple-axes/), or [faceted plots](/python/facet-plots/) with multiple different types of traces. To construct such figures, it can be easier to start from an empty `plotly.graph_objects.Figure` object (or one configured with subplots via the [make_subplots() function](/python/subplots/)) and progressively add traces and update attributes as above. Every `plotly` documentation page lists the Plotly Express option at the top if a Plotly Express function exists to make the kind of chart in question, and then the graph objects version below.
6464

65-
Note that the figures produced by Plotly Express **in a single function-call** are [easy to customize at creation-time](/python/styling-plotly-express/), and to [manipulate after creation](/python/creating-and-updating-figures/) using the `update_*` and `add_*` methods. The figures produced by Plotly Express can always be built from the ground up using graph objects, but this approach typically takes **5-100 lines of code rather than 1**. Here is a simple example of how to produce the same figure object from the same data, once with Plotly Express and once without. The data in this example is in "long form" but [Plotly Express also accepts data in "wide form"](/python/wide-form/) and the line-count savings from Plotly Express over graph objects are comparable. More complex figures such as [parallel coordinates](/python/parallel-coordinates-plot/), [facet plots](/python/facet-plots/) or [animations](/python/animations/) require many more lines of figure-specific graph objects code, whereas switching from one representation to another with Plotly Express usually involves changing just a few characters.
65+
Note that the figures produced by Plotly Express **in a single function-call** are [easy to customize at creation-time](/python/styling-plotly-express/), and to [manipulate after creation](/python/creating-and-updating-figures/) using the `update_*` and `add_*` methods. The figures produced by Plotly Express can always be built from the ground up using graph objects, but this approach typically takes **5-100 lines of code rather than 1**. Here is a simple example of how to produce the same figure object from the same data, once with Plotly Express and once without. The data in this example is in "long form" but [Plotly Express also accepts data in "wide form"](/python/wide-form/) and the line-count savings from Plotly Express over graph objects are comparable. More complex figures such as [sunbursts](/python/sunburst-charts/), [parallel coordinates](/python/parallel-coordinates-plot/), [facet plots](/python/facet-plots/) or [animations](/python/animations/) require many more lines of figure-specific graph objects code, whereas switching from one representation to another with Plotly Express usually involves changing just a few characters.
6666

6767
```python
6868
import pandas as pd

doc/python/heatmaps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fig.show()
6767

6868
### Basic Heatmap with `plotly.graph_objects`
6969

70-
If Plotly Express does not provide a good starting point, it is also possible to use the more generic `go.Heatmap` function from `plotly.graph_objects`.
70+
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Heatmap` class from `plotly.graph_objects`](/python/graph-objects/).
7171

7272
```python
7373
import plotly.graph_objects as go
@@ -182,4 +182,4 @@ Arrays of rasterized values build by datashader can be visualized using
182182
plotly's heatmaps, as shown in the [plotly and datashader tutorial](/python/datashader/).
183183

184184
#### Reference
185-
See https://plotly.com/python/reference/#heatmap for more information and chart attribute options!
185+
See https://plotly.com/python/reference/#heatmap for more information and chart attribute options!

doc/python/histograms.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ fig.show()
146146

147147
## Histograms with go.Histogram
148148

149-
If Plotly Express does not provide a good starting point, it is also possible to use the more generic `go.Histogram` from `plotly.graph_objects`. All of the available histogram options are described in the histogram section of the reference page: https://plotly.com/python/reference#histogram.
149+
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Histogram` class from `plotly.graph_objects`](/python/graph-objects/). All of the available histogram options are described in the histogram section of the reference page: https://plotly.com/python/reference#histogram.
150150

151151
### Basic Histogram
152152

@@ -392,4 +392,4 @@ fig.show()
392392

393393
#### Reference
394394

395-
See https://plotly.com/python/reference/#histogram for more information and chart attribute options!
395+
See https://plotly.com/python/reference/#histogram for more information and chart attribute options!

doc/python/horizontal-bar-charts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fig.show()
6464

6565
### Horizontal Bar Chart with go.Bar
6666

67-
You can also use the more generic function `go.Bar` from `plotly.graph_objects`. All the options of `go.Bar` are documented in the reference https://plotly.com/python/reference/#bar
67+
You can also use [the more generic `go.Bar` class from `plotly.graph_objects`](/python/graph-objects/). All the options of `go.Bar` are documented in the reference https://plotly.com/python/reference/#bar
6868

6969
#### Basic Horizontal Bar Chart
7070

@@ -335,4 +335,4 @@ fig.show()
335335

336336
### Reference
337337

338-
See more examples of bar charts and styling options [here](https://plotly.com/python/bar-charts/).<br> See https://plotly.com/python/reference/#bar for more information and chart attribute options!
338+
See more examples of bar charts and styling options [here](https://plotly.com/python/bar-charts/).<br> See https://plotly.com/python/reference/#bar for more information and chart attribute options!

doc/python/line-and-scatter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ fig.show()
8888

8989
## Scatter and line plot with go.Scatter
9090

91-
If Plotly Express does not provide a good starting point, it is possible to use the more generic `go.Scatter` function from `plotly.graph_objects`. Whereas `plotly.express` has two functions `scatter` and `line`, `go.Scatter` can be used both for plotting points (makers) or lines, depending on the value of `mode`. The different options of `go.Scatter` are documented in its [reference page](https://plotly.com/python/reference/#scatter).
91+
If Plotly Express does not provide a good starting point, it is possible to use [the more generic `go.Scatter` class from `plotly.graph_objects`](/python/graph-objects/). Whereas `plotly.express` has two functions `scatter` and `line`, `go.Scatter` can be used both for plotting points (makers) or lines, depending on the value of `mode`. The different options of `go.Scatter` are documented in its [reference page](https://plotly.com/python/reference/#scatter).
9292

9393
#### Simple Scatter Plot
9494

@@ -276,4 +276,4 @@ fig.show()
276276

277277
### Reference
278278

279-
See https://plotly.com/python/reference/#scatter or https://plotly.com/python/reference/#scattergl for more information and chart attribute options!
279+
See https://plotly.com/python/reference/#scatter or https://plotly.com/python/reference/#scattergl for more information and chart attribute options!

doc/python/line-charts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fig.show()
7171

7272
### Line Plot with go.Scatter
7373

74-
If Plotly Express does not provide a good starting point, it is possible to use the more generic `go.Scatter` function from `plotly.graph_objects`. Whereas `plotly.express` has two functions `scatter` and `line`, `go.Scatter` can be used both for plotting points (makers) or lines, depending on the value of `mode`. The different options of `go.Scatter` are documented in its [reference page](https://plotly.com/python/reference/#scatter).
74+
If Plotly Express does not provide a good starting point, it is possible to use [the more generic `go.Scatter` class from `plotly.graph_objects`](/python/graph-objects/). Whereas `plotly.express` has two functions `scatter` and `line`, `go.Scatter` can be used both for plotting points (makers) or lines, depending on the value of `mode`. The different options of `go.Scatter` are documented in its [reference page](https://plotly.com/python/reference/#scatter).
7575

7676
#### Simple Line Plot
7777

@@ -407,4 +407,4 @@ fig.show()
407407

408408
#### Reference
409409

410-
See https://plotly.com/python/reference/#scatter for more information and chart attribute options!
410+
See https://plotly.com/python/reference/#scatter for more information and chart attribute options!

doc/python/mapbox-county-choropleth.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ fig.show()
159159

160160
### Choropleth map using plotly.graph_objects and carto base map (no token needed)
161161

162-
If Plotly Express does not provide a good starting point, it is also possible to use the more generic `go.Choroplethmapbox` function from `plotly.graph_objects`.
162+
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Choroplethmapbox` class from `plotly.graph_objects`](/python/graph-objects/).
163163

164164
```python
165165
from urllib.request import urlopen
@@ -209,4 +209,4 @@ fig.show()
209209

210210
#### Reference
211211

212-
See https://plotly.com/python/reference/#choroplethmapbox for more information about mapbox and their attribute options.
212+
See https://plotly.com/python/reference/#choroplethmapbox for more information about mapbox and their attribute options.

doc/python/mapbox-density-heatmaps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fig.show()
5656

5757
### Stamen Terrain base map (no token needed): density mapbox with `plotly.graph_objects`
5858

59-
If Plotly Express does not provide a good starting point, it is also possible to use the more generic `go.Densitymapbox` function from `plotly.graph_objects`.
59+
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Densitymapbox` class from `plotly.graph_objects`](/python/graph-objects/).
6060

6161
```python
6262
import pandas as pd
@@ -72,4 +72,4 @@ fig.show()
7272

7373
#### Reference
7474

75-
See https://plotly.com/python/reference/#densitymapbox for more information about mapbox and their attribute options.
75+
See https://plotly.com/python/reference/#densitymapbox for more information about mapbox and their attribute options.

doc/python/pie-charts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fig.show()
104104

105105
### Basic Pie Chart with go.Pie
106106

107-
If Plotly Express does not provide a good starting point, it is also possible to use the more generic `go.Pie` function from `plotly.graph_objects`.
107+
If Plotly Express does not provide a good starting point, it is also possible to use [the more generic `go.Pie` class from `plotly.graph_objects`](/python/graph-objects/).
108108

109109
In `go.Pie`, data visualized by the sectors of the pie is set in `values`. The sector labels are set in `labels`. The sector colors are set in `marker.colors`.
110110

@@ -304,4 +304,4 @@ fig.show()
304304

305305
#### Reference
306306

307-
See https://plotly.com/python/reference/#pie for more information and chart attribute options!
307+
See https://plotly.com/python/reference/#pie for more information and chart attribute options!

doc/python/polar-chart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ fig.show()
8585

8686
## Polar Scatter Plot with go.Scatterpolar
8787

88-
If Plotly Express does not provide a good starting point, you can use the more generic `go.Scatterpolar`. All the options are documented in the [reference page](https://plotly.com/python/reference/#scatterpolar).
88+
If Plotly Express does not provide a good starting point, you can use [the more generic `go.Scatterpolar` class from `plotly.graph_objects`](/python/graph-objects/). All the options are documented in the [reference page](https://plotly.com/python/reference/#scatterpolar).
8989

9090
#### Basic Polar Chart
9191

@@ -438,4 +438,4 @@ fig.show()
438438

439439
#### Reference
440440

441-
See https://plotly.com/python/reference/#scatterpolar for more information and chart attribute options!
441+
See https://plotly.com/python/reference/#scatterpolar for more information and chart attribute options!

doc/python/splom.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ fig.show()
8181

8282
### Scatter matrix (splom) with go.Splom
8383

84-
If Plotly Express does not provide a good starting point, it is possible to use the more generic `go.Splom` function. All its parameters are documented in the reference page https://plotly.com/python/reference/#splom.
84+
If Plotly Express does not provide a good starting point, it is possible to use [the more generic `go.Splom` class from `plotly.graph_objects`](/python/graph-objects/). All its parameters are documented in the reference page https://plotly.com/python/reference/#splom.
8585

8686
The Plotly splom trace implementation for the scatterplot matrix does not require to set $x=Xi$ , and $y=Xj$, for each scatter plot. All arrays, $X_1,X_2,…,X_n$ , are passed once, through a list of dicts called dimensions, i.e. each array/variable represents a dimension.
8787

@@ -289,4 +289,4 @@ fig.update_layout(title=title,
289289
hovermode='closest')
290290

291291
fig.show()
292-
```
292+
```

0 commit comments

Comments
 (0)