(3-D)Retrieving the range of axes of a zoomed-in 3-D Scatter plot (3-D)

How to get the dynamic range (x,y,z) when 3-D scatter plot is zoomed in ?
I’m trying to do a relayout , however I could not find any specific objects which could help me with required data.I also tried passing whole ‘scene’ object instead of ‘scene.camera’ , but no joy :frowning:

I need to get the dynamic range in 3-D plot so that I can determine the data points when I zoom in .

The most robust way is to listen to the plotly_relayout event e.g:

gd.on('plotly_relayout', function(d) {
  // where d will update the update camera settings
})

Thanks for the reply .
Yes I have been using ‘plotly_relayout’ , but it is not giving me the updated range of x,y and z-axis (which happens in 2-d plots) . Is there anyway I can get the range using camera settings ?

Can you please let me know how to do it ? Else is the updated range (x,y,z) info stored somewhere in any other object ?

Hi again,

Zooming in 3d does not update the axis ranges. It “only” changes the scene.camera settings.

To get the computed (i.e. auto) axis range values, you can dig into:

var gd = document.getElementById('id of your graph')

Plotly.newPlot(gd, /* */)

gd._fullLayout.scene.xaxis.range // =>
gd._fullLayout.scene.yaxis.range // =>
gd._fullLayout.scene.zaxis.range // =>

Thanks again . “gd._fullLayout.scene.xaxis.range” gives fixed range , which does not help to solve my problem (which is to get data points after zoom).

Is there a way I can track data-points using ‘camera settings’ which is returned by ‘plotly_relayout’ , I mean there must be some purpose of it right ?

@etienne - Can you please suggest on the above ??