Skip to content

tickpad and labelpad-like kwargs for 3d-axis formatting?  #2721

@ryandvmartin

Description

@ryandvmartin

as seen here:
https://community.plot.ly/t/axes-tick-and-title-spacing-3d-scatter/10819

I was wondering if a pad-like argument could be added to the axis tick and axis title arguments. I dont know js, but the python code to generate the plot is:

x, y, z = np.random.rand(100, 3).T
x *= 5
y *= 2
data = [go.Scatter3d(
    x=x, y=y, z=z,
    mode='markers', 
    marker=dict(color="black", size=3))]
fontdict = dict(tickfont=dict(size=10))
layout = go.Layout(
    width=500, 
    height=400, 
    showlegend=False,
    margin=dict(l=0, r=0, t=0, b=0, pad=0),
    scene=dict(aspectmode="data", 
              xaxis=fontdict, yaxis=fontdict, zaxis=fontdict)
    )
fig = go.Figure(data=data, layout=layout)
iplot(fig)

and the goal is to get the ticklabels and axis titles closer to the axis:

image

like this (edited in paint.. hopefully the idea comes across..):

image

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions