# Python Scikit-learn: Create a joinplot and add regression and kernel density fits using “reg” to describe individual distributions on the same plot between Sepal length and Sepal width

## Python Machine learning Iris Visualization: Exercise-10 with Solution

Write a Python program to create a joinplot and add regression and kernel density fits using “reg” to describe individual distributions on the same plot between Sepal length and Sepal width.

**Sample Solution:**

**Python Code:**

```
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
iris = pd.read_csv("iris.csv")
fig=sns.jointplot(x='SepalLengthCm', y='SepalWidthCm', kind="reg", color='red', data=iris)
plt.show()
```

Sample Output:

**Python Code Editor:**

**Have another way to solve this solution? Contribute your code (and comments) through Disqus.**

**Previous:** Write a Python program to create a joinplot using “kde” to describe individual distributions on the same plot between Sepal length and Sepal width.

**Next:** Write a Python program to draw a scatterplot, then add a joint density estimate to describe individual distributions on the same plot between Sepal length and Sepal width.

**What is the difficulty level of this exercise?**

**Weekly Trends**- 100 Python Projects for Beginners with solution
- Mastering NumPy: 100 Exercises with solutions
- SQL Tutorial
- SQL Inner Join
- Python Exercises, Practice, Solution
- Python Interview Questions and Answers: Comprehensive Guide
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript HTML Form Validation
- Java Collection Exercises