Matplot Matrix Correlation
A correlation diagram can be created using Matplotlib. Matplotlib is the most used plotting library for Python. It can be included in all the graphical toolkits that are available for Python.
Related courses
Matrix definition
To start we define a 2x2 matrix and a list called groups. The matrix is defined inside the brackets (double [[ and ]] if written on a single line).

Visual:
Correlation using Matplotlib
Matrix correlation
The code below generates a Matrix correlation diagram using Matplotlib.

Initially we define the matrix (m) and the list (groups).
We set the length to be equal to the length of the groups. On the x axis and y axis we set the group names.
Posted in Plotting
Leave a Reply: