用plotly绘4d的图,只添加坐标轴标题就可以run,但是加上坐标轴的其他参数就显示axis错误,请问哪里出现问题了呢
import pandas as pd
import plotly
import plotly.graph_objs as go
#Read cars data from csv
data = pd.read_csv(r"G:\item\model\model\result\chulishujv\muscle_daima-export2.0\import_python.csv")
#Set marker properties
markercolor = data["Max cluster volume"]
#Make Plotly figure
fig1 = go.Scatter3d(x=data["BMI"],
y=data["IT radius of calvature"],
z=data["muscleatrophy"],
marker=dict(color=markercolor,
opacity=1,
reversescale=True,
),
line=dict (width=0.02),
mode='markers')
#Make Plot.ly Layout
mylayout = go.Layout(autosize=False,
font=dict(
family="Times New Roman",
size = 11),
width=700,
height=450,
margin=go.Margin(
l=150,
r=160,
b=100,
pad=3),
xaxis=dict(
title="BMI(Kg/m2)",
showgrid=False,
showticklabels=True,
tickangle=25,
autorange=False,
tickfont=dict(
family="Times New Roman",
size=12, color='black',),
dtick=5,tick0="L5", range=[15, 40],
linewidth=5, ),
yaxis=dict( title="IT radius of calvature(mm)"),
zaxis=dict(title="muscleatrophy(%)"))
#Plot and save html
plotly.offline.plot({"data": [fig1],
"layout": mylayout},
auto_open=True,
filename=("4DPlot.html"))
你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答
本次提问扣除的有问必答次数,将会以问答VIP体验卡(1次有问必答机会、商城购买实体图书享受95折优惠)的形式为您补发到账户。
因为有问必答VIP体验卡有效期仅有1天,您在需要使用的时候【私信】联系我,我会为您补发。