Question: How do I make a heat map using the seaborn library in python when I have separate arrays of data? For example, lets say I

How do I make a heat map using the seaborn library in python when I have separate arrays of data? For example, lets say I have two arrays:

xdat = np.linspace(0,10,10)

ydat = np.linspace(0,10,10)

And I want these to be my x and y data axes. And I want the color of the heat map correlated to some function:

def f(A,B):

return A*B

zvals = f(xdat,ydat)

So I want the x and y axis to be xdat and y dat, and the color corresponding to the value of f at those xdat and y dat. Suggestions?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!