我只是从https://plot.ly/python/gauge-charts/尝试了代码,尽管它无法正常工作。你能指导我哪里出问题了吗?我是python的新手,也是密谋。这是代码:
import plotly.plotly as py
import plotly.graph_objs as go
from plotly.offline import *
base_chart = {
"values": [40, 10, 10, 10, 10, 10, 10],
"labels": ["-", "0", "20", "40", "60", "80", "100"],
"domain": {"x": [0, .48]},
"marker": {
"colors": [
'rgb(255, 255, 255)',
'rgb(255, 255, 255)',
'rgb(255, 255, 255)',
'rgb(255, 255, 255)',
'rgb(255, 255, 255)',
'rgb(255, 255, 255)',
'rgb(255, 255, 255)'
],
"line": {
"width": 1
}
},
"name": "Gauge",
"hole": .4,
"type": "pie",
"direction": "clockwise",
"rotation": 108, …Run Code Online (Sandbox Code Playgroud)