Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit81c774b

Browse files
committed
object array -> object tuple
1 parent7151708 commit81c774b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎notebooks/templates.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ fig.show()
176176
Note that because we built the template with a list of 3 scatter trace graph objects (one each for the diamond, square, and circle symbols), the forth scatter trace in the figure cycles around and takes on the defaults specified in the first template trace (The diamond symbol).
177177

178178

179-
###Themingarray properties
180-
Some properties in the figure hierarchy are specified asarrays of objects. For example, the text annotations for a graph object figure are stored as a tuple of`go.layout.Annotation` objects in the`annotations` property of the figure's layout.
179+
###Themingobject tuple properties
180+
Some properties in the figure hierarchy are specified astuples of objects. For example, the text annotations for a graph object figure are stored as a tuple of`go.layout.Annotation` objects in the`annotations` property of the figure's layout.
181181

182-
To use a template to configure the default properties of all of the elements in an objectarray property (e.g.`layout.annotations`), use the`*defaults` property in the template that corresponds to thearray property (e.g.`layout.template.layout.annotationdefaults`). The`*defaults` template property should be set to a single graph object that matches the type of the elements of the correspondingarray. The properties of this`*defaults` object in the template will be applied to all elements of the objectarray in the figure that the template is applied to.
182+
To use a template to configure the default properties of all of the elements in an objecttuple property (e.g.`layout.annotations`), use the`*defaults` property in the template that corresponds to thetuple property (e.g.`layout.template.layout.annotationdefaults`). The`*defaults` template property should be set to a single graph object that matches the type of the elements of the correspondingtuple. The properties of this`*defaults` object in the template will be applied to all elements of the objecttuple in the figure that the template is applied to.
183183

184184
Here is an example that creates a template that specifies the default annotation text color, and then constructs a figure that uses this template.
185185

@@ -199,11 +199,11 @@ fig.update_layout(
199199
fig.show()
200200
```
201201

202-
###Includingarray elements in a theme
202+
###Includingtuple elements in a theme
203203

204-
The previous section described how to use a template to customize the default properties ofarray elements that are added to a figure that the template is applied to. This is useful for styling, for example, any annotations, shapes, or images that will eventually be added to the figure.
204+
The previous section described how to use a template to customize the default properties oftuple elements that are added to a figure that the template is applied to. This is useful for styling, for example, any annotations, shapes, or images that will eventually be added to the figure.
205205

206-
It is also possible for a template to definearray elements that should be included, as is, in any figure that the template is applied to. This is done by specifying a list of one or morearray element graph objects (e.g.`go.layout.Annotation` objects) as the value of the correspondingarray property in the template (e.g. at`template.layout.annotations`). Note that the`name` property of thesearray element graph objects must be set to a unique non-empty string.
206+
It is also possible for a template to definetuple elements that should be included, as is, in any figure that the template is applied to. This is done by specifying a list of one or moretuple element graph objects (e.g.`go.layout.Annotation` objects) as the value of the correspondingtuple property in the template (e.g. at`template.layout.annotations`). Note that the`name` property of thesetuple element graph objects must be set to a unique non-empty string.
207207

208208
Here is an example that creates a template that adds a large semi-transparent "DRAFT" watermark to the middle of the figure, and constructs a figure using this template.
209209

@@ -231,8 +231,8 @@ fig.update_layout(template=draft_template)
231231
fig.show()
232232
```
233233

234-
###Customizing themearray elements in a figure
235-
The previous section described how a template can be used to add defaultarray element graph objects (e.g. annotations, shapes, or images) to a figure. The properties of these defaultarray elements can be customized from within the figure by adding anarray element with a`templateitemname` property that matches the`name` property of the template object.
234+
###Customizing themetuple elements in a figure
235+
The previous section described how a template can be used to add defaulttuple element graph objects (e.g. annotations, shapes, or images) to a figure. The properties of these defaulttuple elements can be customized from within the figure by adding antuple element with a`templateitemname` property that matches the`name` property of the template object.
236236

237237
Here is an example, using the same`draft_template` defined above, that customizes the watermark from within the figure to read "CONFIDENTIAL" rather than "DRAFT".
238238

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp