✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
📊 Dash 2.0 is Arriving. Register here.

Axes tick and title spacing 3d scatter

I would like to have finer controls over the tick and label spacing from the axes in plotting3d. The issue is reproduced with:

x, y, z = np.random.rand(100, 3).T
x *= 5
y *= 2
data = [go.Scatter3d(
    x=x, y=y, z=z,
    marker=dict(color="black", size=3))]
fontdict = dict(tickfont=dict(size=10))
layout = go.Layout(
    margin=dict(l=0, r=0, t=0, b=0, pad=0),
              xaxis=fontdict, yaxis=fontdict, zaxis=fontdict)
fig = go.Figure(data=data, layout=layout)

I would simply like to have the ticks and the labels be closer to the axis.


Is there a tick property that allows this? like the pad params from matplotlib.


Hi @rmar,

I played around with your example and the tick options a bit and I don’t think it’s possible to directly control this spacing.

Feel free to open a feature request issue in the plotly.js repository if you’d like to propose some additional controls.

Thanks for the quick reply!

I created this issue: https://github.com/plotly/plotly.js/issues/2721