{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 图结构\n",
"\n",
"参考:[图结构](https://daobook.github.io/plotly-book/tutorial/fundamentals/00_figure-structure.html) & [renderers](https://daobook.github.io/plotly-book/tutorial/fundamentals/02_renderers.html)"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import plotly.express as px\n",
"from plotly import graph_objects as go\n",
"\n",
"go.FigureWidget(); # 初始化"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 图的属性\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"先看简单的折线图:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
" \n",
" "
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"hovertemplate": "x=%{x}
y=%{y}