Seaborn allows to make a correlogram or correlation matrix really easily. Correlogram are awesome for **exploratory analysis**: it allows to quickly observe the relationship between every variable of your matrix. It is easy to do it with seaborn: just call the **pairplot** function

# library & dataset import seaborn as sns df = sns.load_dataset('iris') import matplotlib.pyplot as plt # Basic correlogram sns.pairplot(df) sns.plt.show()

Thanks for this post, useful for a beginner using Seaborn and charting in python. However, in testing it seems the last line should be

`sns.plt.show()`

Isnt the last line just

plt.show()

?

that is what i found to work

Can you give more details on what the dataset ‘iris’ is please?

please see…

https://en.wikipedia.org/wiki/Iris_flower_data_set

Hello, I have rainfall (time, lat, lon) – 3 dimensional data over a region and temperature (time) over a single location – 1 dimensional. I want to find correlation map over region with single location. please help me out.

Thanks

HOW CAN WE SEE THE CORRELATION COEFFICIENT ON THE PLOT. THE MATRIX SHOWS THE DATA BUT WHAT ABOUT THE COEFFICIENT NUMBER?

Hello, I have some set of data in excel and I would like to generate correlation plots using python. But I don’t really know python. Can anyone help me with python program for correlation plot?

@Snehal, put the data in a folder, and create an instance of a Jupyter Notebook in the same folder if you are using Jupyter Notebook in Anaconda.

type:

import matplotlib.pyplot as plt

import pandas as pd

Then, type df= pd.read_csv(‘yourdataname.csv’)

It will be read into Python memory that way.

Finally, type df.Corr() and run it(CTRL+ENTER)