Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xaxis_title in mesh3d #121

Closed
gdkrmr opened this issue May 30, 2017 · 2 comments
Closed

xaxis_title in mesh3d #121

gdkrmr opened this issue May 30, 2017 · 2 comments

Comments

@gdkrmr
Copy link

gdkrmr commented May 30, 2017

The following does not change the title of the x-axis:

function trisurf()
    facecolor = repeat([
        "rgb(50, 200, 200)",
        "rgb(100, 200, 255)",
        "rgb(150, 200, 115)",
        "rgb(200, 200, 50)",
        "rgb(230, 200, 10)",
        "rgb(255, 140, 0)"
    ], inner=[2])

    t = mesh3d(
        x=[0, 0, 1, 1, 0, 0, 1, 1],
        y=[0, 1, 1, 0, 0, 1, 1, 0],
        z=[0, 0, 0, 0, 1, 1, 1, 1],
        i=[7, 0, 0, 0, 4, 4, 2, 6, 4, 0, 3, 7],
        j=[3, 4, 1, 2, 5, 6, 5, 5, 0, 1, 2, 2],
        k=[0, 7, 2, 3, 6, 7, 1, 2, 5, 5, 7, 6],
        facecolor=facecolor)

    plot(t, Layout(xaxis_title = "x_axis"))
end
trisurf()
@sglyon
Copy link
Member

sglyon commented May 30, 2017

Yes, this is one of the only inconsistencies in the plotly.js api.

When you have a 3d plot in order to change axis titles you need to construct a scene field on the layout, then set things on xaxis, yaxis, zaxis within the scene

That means you need to do Layout(scene_xaxis_title="x_axis")

@gdkrmr
Copy link
Author

gdkrmr commented May 30, 2017

works, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants