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

# How to make 3D Trisurf plots using plotly?

This recipe helps you make 3D Trisurf plots using plotly

0

## Recipe Objective

Make 3D Trisurf plots using plotly.

Trisurf plot these are formed by replacing the boundries of a compact surface by touching triangles. The plots can be made by using a figure factory.

## Step 1 - Import libraries

``` import plotly.figure_factory as ff import numpy as np from scipy.spatial import Delaunay ```

## Step 2 - Define the values

``` u = np.linspace(0, 2*np.pi, 24) v = np.linspace(-1, 1, 8) u,v = np.meshgrid(u,v) u = u.flatten() v = v.flatten() ``` ``` tp = 1 + 0.5*v*np.cos(u/2.) x = tp*np.cos(u) y = tp*np.sin(u) z = 0.5*v*np.sin(u/2.) ```

## Step 3 - Plot graph

``` fig = ff.create_trisurf(x=x, y=y, z=z, colormap="Portland", simplices=My_simplices, title="The Mobius Band") fig.show() ```

#### Relevant Projects

##### 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.

##### Choosing the right Time Series Forecasting Methods
There are different time series forecasting methods to forecast stock price, demand etc. In this machine learning project, you will learn to determine which forecasting method to be used when and how to apply with time series forecasting example.

##### 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.

##### Predict Macro Economic Trends using Kaggle Financial Dataset
In this machine learning project, you will uncover the predictive value in an uncertain world by using various artificial intelligence, machine learning, advanced regression and feature transformation techniques.

##### 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.

##### Ecommerce product reviews - Pairwise ranking and sentiment analysis
This project analyzes a dataset containing ecommerce product reviews. The goal is to use machine learning models to perform sentiment analysis on product reviews and rank them based on relevance. Reviews play a key role in product recommendation systems.

##### 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.

##### German Credit Dataset Analysis to Classify Loan Applications
In this data science project, you will work with German credit dataset using classification techniques like Decision Tree, Neural Networks etc to classify loan applications using R.

##### Machine Learning or Predictive Models in IoT - Energy Prediction Use Case
In this machine learning and IoT project, we are going to test out the experimental data using various predictive models and train the models and break the energy usage.

##### Credit Card Fraud Detection as a Classification Problem
In this data science project, we will predict the credit card fraud in the transactional dataset using some of the predictive models.