I have several lists that I want to write a function and use loop to make multiple heatmaps out of those lists. Then I want to name each heatmap by the name of the list. How can I turn the list name into string?
list1 = [[1,2,3], [4,5,6], [4,5,6], [4,5,6]]
list2 = [[2,2,3], [1,5,1], [4,2,3], [3,3,6]]
data = (list1, list2)
def hm(df):
sns.set_style("whitegrid")
ax = sns.heatmap(df, cmap=cmap)
plt.title('df')
return fig
for l in data:
hm(1)