import plotly as py
import plotly.graph_objs as go
import plotly.express as px
- 生成为本地的html文件
import plotly.offline as py
py.plot(fig, filename='filename.html')
2.读取excel的多个表格(无公式计算列)
adr = r'.\表.xlsx'
sheet_name = [0,1,3,4,5,7]
df = pd.read_excel(adr,sheet_name=sheet_name)
- da.name+=‘**’
fig = px.scatter(df0,x='true_value',y='error',color='machineid')
for da in fig1.data:
da.mode='markers+lines'
da.name+='_**'
for da in fig.data:
da.mode='markers+lines'
da.legendgroup+='1'
da.name+='_**'
fig1.add_trace(da)
fig1.update_layout(title='测试',
yaxis_title='误差(mm)',
xaxis_title='真实值(mm)')
fig1.show()