1

I am building a plotly surface that follows their online example here. I haven't been able to find an example of a 3D surface with custom axis labels like they have here. I tried putting an xaxis object with a title on the layout object then passing it as the third parameter to the Plotly.newPlot() command, but nothing rendered.

Does anyone know an example of this working or know where I can dig into or if it's even possible?

var layout = {
    title: 'Surface Plot',
    xaxis: {
        title: 'This is a test'
    }
};
Plotly.newPlot('someDiv', data, layout);
2
  • 1
    For 3d plots you're going to have the set these parameters (xaxis and zaxis as well): plot.ly/javascript/reference/#layout-scene-yaxis-title Commented Jul 13, 2016 at 17:55
  • hey @d-roy, I don't think it's working. I'm setting the title and the titlefont properties for all 3 axes. Here is a jsfiddle jsfiddle.net/27cfgLet/2 Commented Jul 14, 2016 at 13:44

1 Answer 1

2

as far as i can tell, d-roy told you the whole truth in his comment yesterday:

var layout = {
  title: 'Mt Bruno Elevation',
  scene: {
    xaxis: {
      title: 'thisIsATest',
      titlefont: {
         color: 'red',
         family: 'Arial, Open Sans',
         size: 12
      }
    },
...

Works for me. See: https://jsfiddle.net/27cfgLet/3/

Sign up to request clarification or add additional context in comments.

1 Comment

Oh wow, sorry d-roy. I didn't see the global "scene" object in your link. Thanks for the clarification user1121361

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.