我正在制作一个中等成功的三维曲面图,但有些参数对我的标志没有响应,比如轴范围、标签和对数刻度,但有些参数却有反应,比如总标题和纵横比。我不明白问题所在,有人能看出我做错了什么吗?在
谢谢
def make3dPlot(surfaceMatrix, regionStart, regionEnd):
data = [go.Surface(z=surfaceMatrix)]
#data = [go.Surface(z=[[1, 2, 3, 4, 9],[4, 1, 3, 7, 9],[5, 4, 7, 2, 9]])]
layout = go.Layout(
title=args.i,
autosize=True,
width=1600,
height=1000,
yaxis=dict(
title='Particle Size',
titlefont=dict(
family='Arial, sans-serif',
size=18,
color='lightgrey'
),
type='log',
autorange=True,
#range=[regionStart, RegionEnd]
),
xaxis=dict(
title="Genomic Co-ordinates",
titlefont=dict(
family='Arial, sans-serif',
size=18,
color='lightgrey'
),
#type='log',
#autorange=False,
range=[10, 15]#regionStart, regionEnd]
),
scene=dict(
aspectratio=dict(x=3, y=1, z=1),
aspectmode = 'manual'
)
)
fig = go.Figure(data=data, layout=layout)
plotly.offline.plot(fig)
对于模拟数据,轴不变,没有标签:
根据docs,}是{}的一部分,而不是{}。在
xaxis
,yaxis
和{示例:
另请参见this question。在
相关问题 更多 >
编程相关推荐