Skip to content

problem in customized ticks in go.Surface  #2158

@aligoglos

Description

@aligoglos

I want to customize x and y labels, I tried this but haven't worked!

fig = go.Figure(data=[go.Surface(z=z_vals)])
    print(list(lable1))
    print(list(lable2))
    fig.update_layout(scene=dict(
        xaxis=dict(
            nticks = 12,
            ticktext=list(lable1)),
        yaxis=dict(
            nticks=12,
            ticktext=list(lable2)),
    ))
    fig.show()

print results:

['1398/01', '1398/02', '1398/03', '1398/04', '1398/05', '1398/06', '1398/07', '1398/08', '1398/09', '1398/10', '1398/11', '1398/12']

['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l']

but always show :
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions