有谁能给我一个提示,如何添加x,y,z轴标题到3曲面图创建plotly&cufflinks?你知道吗
我用的是Python3.7
import plotly.plotly as py
import plotly.graph_objs as go
from plotly.offline import iplot, init_notebook_mode
# Using plotly + cufflinks in offline mode
import cufflinks
cufflinks.go_offline(connected=True)
init_notebook_mode(connected=True)
import pandas as pd
import numpy as np
# creating dataframe with three axes
df = pd.DataFrame({'x':[1, 2, 3, 4, 5],
'y':[10, 20, 30, 20, 10],
'z':[5, 4, 3, 2, 1]})
# colorscale:red(rd), yellow(yl), blue(bu)
df.iplot(kind ='surface', colorscale ='rdylbu')
有什么建议吗?谢谢。你知道吗
给你:
相关问题 更多 >
编程相关推荐