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

Commit4825440

Browse files
committed
Push down pio import in first dictionary example
1 parent58a9154 commit4825440

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎notebooks/creating-updating-figures.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,18 @@ jupyter:
3131
##Figures as dictionaries
3232
The goal of plotly.py is to provide a pleasant Python interface for creating figure specifications for display in the Plotly.js JavaScript library. In Plotly.js, a figure is specified by a declarative JSON data structure, and so the ultimate responsibility of plotly.py is to produce Python dictionaries that can be serialized into a JSON data structure that represents a valid figure.
3333

34-
As a concrete example, here isthe Python dictionary that represents a figure containing a single bar trace and a title.
34+
As a concrete example, here isa Python dictionary that represents a figure containing a single bar trace and a title.
3535

3636
```python
37-
import plotly.ioas pio
3837
fig= {
3938
"data": [{"type":"bar",
4039
"x": [1,2,3],
4140
"y": [1,3,2]}],
4241
"layout": {"title": {"text":"A Bar Chart"}}
4342
}
43+
44+
# To display the figure defined by this dict, use the low-level plotly.io.show function
45+
import plotly.ioas pio
4446
pio.show(fig)
4547
```
4648

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp