簡體   English   中英

設置軸 label 和 3D 表面 plot 使用 ZA5E13387C005FE8D17E1AC7C創建的軸刻度之間的間距

[英]Set the spacing between axis label and axis ticks of a 3D surface plot created using Plotly

How to adjust the spacing between the axis label and axis ticks of a 3D surface plot created using Plotly, in python?

在邊距中使用pad參數:

import plotly.graph_objects as go

fig = go.Figure()

fig.add_trace(go.Scatter(
    x=[0, 1, 2, 3, 4, 5, 6, 7, 8],
    y=[0, 1, 2, 3, 4, 5, 6, 7, 8]
))

fig.update_layout(
    autosize=False,
    width=500,
    height=500,
    margin=dict(
        l=50,
        r=50,
        b=100,
        t=100,
        pad=4
    ),
    paper_bgcolor="LightSteelBlue",
)

fig.show()

https://plotly.com/python/setting-graph-size/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM