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

Axis labels don't work with 3D plots #347

Closed
travelingspaceman opened this issue Aug 25, 2020 · 2 comments
Closed

Axis labels don't work with 3D plots #347

travelingspaceman opened this issue Aug 25, 2020 · 2 comments

Comments

@travelingspaceman
Copy link

The *axis_title properties do not work on 3D plots. As a simple example:

using PlotlyJS
plot(scatter3d(x=rand(10), y=rand(10), z=rand(10), mode="markers"),
     Layout(xaxis_title="X axis",
            yaxis_title="Y axis",
            zaxis_title="Z axis",
            title="Title"))

Produces the following figure (notice the axis labels are still the default):
image

@sglyon
Copy link
Member

sglyon commented Aug 25, 2020

I believe for some reason you need to add these properties to the Layout.scene property

Something like this should work:

using PlotlyJS
plot(scatter3d(x=rand(10), y=rand(10), z=rand(10), mode="markers"),
     Layout(scene=attr(xaxis_title="X axis",
            yaxis_title="Y axis",
            zaxis_title="Z axis",
            title="Title")))

AFAIK this only applies to 3d plots

@travelingspaceman
Copy link
Author

That 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