is there any way that i can rotate the plot using the code from
to
Skiks
November 23, 2023, 10:26am
2
Hi @jerrygoh89 ! Welcome on the forum!
I think you can use the layout parameter scene_camera
, you can find details here:
Hi Skiks,
Thanks for the warm welcome!
I’ve tried to play with the camera_eye but I couldn’t understand how does the xyz value contribute to the angle, do you have any idea?
AIMPED
November 24, 2023, 9:34am
4
Hey @jerrygoh89 ,
I created a small app to test the scene
parameters a while ago because I had the same problem. Maybe it helps you to understand the settings:
import json
import dash
from dash import html, dcc, Input, Output, State, clientside_callback
import dash_bootstrap_components as dbc
import plotly.graph_objects as go
import pandas as pd
# Read data from a csv
z_data = pd.read_csv(
'https://raw.githubusercontent.com/plotly/datasets/master/api_docs/mt_bruno_elevation.csv')
fig = go.Figure(
data=go.Surface(z=z_data.values),
layout=dict(
title='Mt Bruno Elevation',
autosize=True,
width=500,
height=500,
margin=dict(l=0, r=0, b=0, t=30),
This file has been truncated. show original
1 Like
@AIMPED
Thanks very much, your apps helps!
1 Like