[英]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? How to adjust the spacing between the axis label and axis ticks of a 3D surface plot created using Plotly, in python?
Use the pad
parameter in the margin:在边距中使用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/ https://plotly.com/python/setting-graph-size/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.