Using the below code I have set the size of axis range and ratio and it works correctly. But when I plot the model the zoom of model is not correct in first view and I have to zoom out the model to see whole of it. What should I do till when I plot the model, initially the whole model completely can be seen?
@Bijan To display your model, completely, set scene_camera_eye=dict(x=a, y=a, z=1), where a is chosen by trial and error. The default value for a is 1.25, but you mai set it even greater than 2.
is there any reference about βaβ? Because I have various figures I need the scale of βaβ instead of trial and error. seems thatβs a ratio but it is not clear ratio of what values.
@Bijan
If you print help(go.layout.scene.Camera.eye) it is displayed the following information:
Help on property:
Sets the (x,y,z) components of the 'eye' camera vector. This
vector determines the view point about the origin of this
scene.
The 'eye' property is an instance of Eye
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.scene.camera.Eye`
- A dict of string/value properties that will be passed
to the Eye constructor
Supported dict properties:
x
y
z
Returns
-------
plotly.graph_objs.layout.scene.camera.Eye
I have the same problem, but βtrial and errorβ is not an option because I am plotting many different graphs in a loop.
I already tried calculating the camera distance (in my case cam eye z) from the maximum of the x and y ranges and a fov of 45 deg (which i read somewhere is the built-in fov), but that does not work for some reason. is there no option to tell the graph to adjust the zoom / size / cam-dist automatically so that it is wholly contained in the pixel dimensions of my layout?