FunctionRacerProblemsRace

Correlation Picture

HardmatplotlibPython

Each column of X is one measurement and names holds the column names. Compute the correlation of every column with every other and show the table as an image with vmin=-1 and vmax=1, so that the colors mean the same in every chart. Put the names on both axes as tick labels at the positions 0, 1, 2, ..., and write each correlation in its cell with 2 decimals. Return the figure.

Checked: the grid of values, the x tick labels, the y tick labels and the texts.

Example 1

X [[1,2,5],[2,4,3],[3,6,4],[4,8,1],[5,10,2]]
names ["a","b","c"]
draws
The chart to draw in example 1 of Correlation Picture

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More matplotlib problems