How to make 3D camera controls using plotly?
MACHINE LEARNING RECIPES DATA CLEANING PYTHON DATA MUNGING PANDAS CHEATSHEET     ALL TAGS

# How to make 3D camera controls using plotly?

This recipe helps you make 3D camera controls using plotly

0

## Recipe Objective

Make 3D camera controls using plotly.

Camera controls in this there are 3 vectors which will determine the camera position and direction. The 3 vectors are "up, center, eye" there coordinates refer to 3d domain which is (0,0,0) is always the center of the domain, no matter the data values. The up vector determines the up direction on the page. The default is (x=0,y=0,z=1), that is, the z-axis points up. The projection of the center point lies at the center of the view. By default it is (x=0,y=0,z=0).

## Step 1 - Import libraries

``` import plotly.graph_objects as go import plotly.express as px ```

## Step 2 - load dataset

``` Sample_data = px.data.iris() Sample_data.head() ```

## Step 3 - Plot graph

``` fig = go.Figure(data=go.Surface(z=Sample_data, showscale=False)) fig.update_layout( title='My iris Data', width=400, height=400, margin=dict(t=40, r=0, l=20, b=20) ) ``` ``` name = 'default' camera = dict( up=dict(x=0, y=0, z=1), ```

Here in the above we are plotting the graph, the default parameters which are used when layout.scene.camera is not provided.

#### Relevant Projects

##### Zillow’s Home Value Prediction (Zestimate)
Data Science Project in R -Build a machine learning algorithm to predict the future sale prices of homes.

##### Predict Churn for a Telecom company using Logistic Regression
Machine Learning Project in R- Predict the customer churn of telecom sector and find out the key drivers that lead to churn. Learn how the logistic regression model using R can be used to identify the customer churn in telecom dataset.

##### Demand prediction of driver availability using multistep time series analysis
In this supervised learning machine learning project, you will predict the availability of a driver in a specific area by using multi step time series analysis.

##### Data Science Project in Python on BigMart Sales Prediction
The goal of this data science project is to build a predictive model and find out the sales of each product at a given Big Mart store.

##### Predict Employee Computer Access Needs in Python
Data Science Project in Python- Given his or her job role, predict employee access needs using amazon employee database.

##### Data Science Project on Wine Quality Prediction in R
In this R data science project, we will explore wine dataset to assess red wine quality. The objective of this data science project is to explore which chemical properties will influence the quality of red wines.

##### Predict Credit Default | Give Me Some Credit Kaggle
In this data science project, you will predict borrowers chance of defaulting on credit loans by building a credit score prediction model.

##### Build a Music Recommendation Algorithm using KKBox's Dataset
Music Recommendation Project using Machine Learning - Use the KKBox dataset to predict the chances of a user listening to a song again after their very first noticeable listening event.

##### Time Series Forecasting with LSTM Neural Network Python
Deep Learning Project- Learn to apply deep learning paradigm to forecast univariate time series data.

##### Build a Collaborative Filtering Recommender System in Python
Use the Amazon Reviews/Ratings dataset of 2 Million records to build a recommender system using memory-based collaborative filtering in Python.