Skip to content

Commit fb84751

Browse files
fix doc order
1 parent ed352d9 commit fb84751

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Diff for: doc/python/figure-introspection.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ jupyter:
2727
language: python
2828
layout: base
2929
name: Introspecting Figures
30-
order: 35
30+
order: 36
3131
page_type: u-guide
3232
permalink: python/figure-introspection/
3333
thumbnail: thumbnail/violin.jpg
3434
---
3535

3636
### The Figure Lifecycle
3737

38-
As explained in the [Figure Data Structure documentation](/python/figure-structure/), when building a figure object with Plotly.py, it is not necessary to populate every possible attribute. At render-time, figure objects (whether generated via [Plotly Express](/python/plotly-express/) or [Graph Objects](/python/graph-objects/) are passed from Plotly.py to [Plotly.js](/javascript/), which is the Javascript library responsible for turning JSON descriptions of figures into graphical representations.
38+
As explained in the [Figure Data Structure documentation](/python/figure-structure/), when building a figure object with Plotly.py, it is not necessary to populate every possible attribute. At render-time, figure objects (whether generated via [Plotly Express](/python/plotly-express/) or [Graph Objects](/python/graph-objects/) are passed from Plotly.py to [Plotly.js](/javascript/), which is the Javascript library responsible for turning JSON descriptions of figures into graphical representations.
3939

4040
As part of this rendering process, Plotly.js will determine, based on the attributes that have been set, which other attributes require values in order to draw the figure. Plotly.js will then apply either static or dynamic defaults to all of the remaining required attributes and render the figure. A good example of a static default would be the text font size: if unspecified, the default value is always the same. A good example of a dynamic default would be the range of an axis: if unspecified, the default will be computed based on the range of the data in traces associated with that axis.
4141

@@ -71,9 +71,9 @@ import plotly.graph_objects as go
7171

7272
fig = go.Figure(
7373
data=[go.Scatter(
74-
mode="markers+text",
75-
x=[10,20],
76-
y=[20, 10],
74+
mode="markers+text",
75+
x=[10,20],
76+
y=[20, 10],
7777
text=["Point A", "Point B"]
7878
)],
7979
layout=dict(height=400, width=400, template="none")
@@ -89,7 +89,7 @@ print(fig)
8989

9090
Now let's look at the "full" figure after Plotly.js has computed the default values for every necessary attribute.
9191

92-
> Heads-up: the full figure is quite long and intimidating, and this page is meant to help demystify things so **please read on**!
92+
> Heads-up: the full figure is quite long and intimidating, and this page is meant to help demystify things so **please read on**!
9393
9494
Please also note that the `.full_figure_for_development()` function is really meant for interactive learning and debugging, rather than production use, hence its name and the warning it produces by default, which you can see below, and which can be supressed with `warn=False`.
9595

@@ -108,7 +108,7 @@ print("full_fig.layout.xaxis.range: ", full_fig.layout.xaxis.range)
108108
### Learning About Attributes
109109

110110

111-
What else can we use this `full_fig` for? Let's start by looking at the first entry of the `data`
111+
What else can we use this `full_fig` for? Let's start by looking at the first entry of the `data`
112112

113113
```python
114114
print(full_fig.data[0])
@@ -144,12 +144,12 @@ import plotly.graph_objects as go
144144

145145
fig = go.Figure(
146146
data=[go.Scattergeo(
147-
mode="markers+text",
148-
lat=[10, 20],
149-
lon=[20, 10],
147+
mode="markers+text",
148+
lat=[10, 20],
149+
lon=[20, 10],
150150
text=["Point A", "Point B"]
151151
)],
152-
layout=dict(height=400, width=400,
152+
layout=dict(height=400, width=400,
153153
margin=dict(l=0,r=0,b=0,t=0),
154154
template="none")
155155
)

0 commit comments

Comments
 (0)