0
votes

I have a dataset that consists of an (x,y) pair and v which describes a value at (x,y). The data needs to produce a figure that looks like:

Surface Plot being abused

This was created by using a surface plot, changing the eye and up values, and then turning the aspectratio on the z-axis to 0.01:

layout= {{
  ...
  aspectmode: "manual",                                          
  aspectratio: {x: "3", y: "1", z: ".01"},
  scene: {
     ...
     zaxis: {
       visible: false
     }
  }
}}

Notice that the x/y axes are still raised and awkwardly placed. I have two parts to my question:

  1. Is there a better graph to show this data like this using Plotly? The end product needs to be the same, but the way I get there can change.

  2. If this is the best way, how do I "lower" the x/y axes to make it look like a 2D plot?

The original reason I went the route of using a surface plot is because of Matlab. When building a surface plot and rotating it to one of the planes (x/y/z), it will essentially turn into a 2D figure.

1

1 Answers

0
votes

After a good walk and looking at the documentation, using:

layout = {{
  ...
  scene: {
    ...
    xaxis: {
      ...
      tickangle: 0
    }
  }
}}

Removed the '3D' effects. I also changed the aspectratio of z to be: .001