使用pyplot时,由于图例而导致图表大小调整问题。这是代码:
random_x = df['column1']
random_y = df['column2']
random_x1 = df['column1']
random_y1 = df['column3']
trace = go.Scatter(
x = random_x,
y = random_y,
name='abcdefghijklmnop......'
)
trace1 = go.Scatter(
x = random_x1,
y = random_y1,
name='abcdefghijklmnopadfdsfsdff......'
)
data = [trace,trace1]
iplot(data, filename='basic-line')
它给了我图表,但由于我的传奇字符很长,它减少了我实际图形的大小。我希望这些传说要么来自底层,要么更深入
答案 0 :(得分:0)
layout = go.Layout(
legend=dict(
orientation="h")
)
figure=go.Figure(data=data, layout=layout)
iplot(figure,filename='basic-line')