Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

Python Scikit-learn: Create a joinplot to describe individual distributions on the same plot between Sepal length and Sepal width

Python Machine learning Iris Visualization: Exercise-7 with Solution

Write a Python program to create a joinplot to describe individual distributions on the same plot between Sepal length and Sepal width.

Note: joinplot - Draw a plot of two variables with bivariate and univariate graphs.

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', data=iris, color='blue') 
plt.show()

Sample Output:

Python Machine learning Output: Iris Visualization: Exercise-7
 

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 graph to see how the length and width of SepalLength, SepalWidth, PetalLength, PetalWidth are distributed.
Next: Write a Python program to create a joinplot using “hexbin” to describe individual distributions on the same plot between Sepal length and Sepal width.

What is the difficulty level of this exercise?