Issue
Having a list containing lists (of different sizes) of variables:
res = [[0.01, 0.9, 0.46], [0.64, 0.24], [0.87, 0.99, 0.47, 0.75], ...]
(note that the actual lists contain ~3000 variables each)
And let's say:
x = [0, 1, 2, ...]
Is there a way to make a heat-map out of it, with the values from res on the y axis ?
This being for example the heatmap of one of one of the lists:
I would just like to to this for every list and have them all on the same heat-map
Solution
I found a workaround by doing the following:
y_ax = []
cpt = 0
for i, elem in enumerate(res):
y_ax.append([i]*len(elem))
res_flat = sum(res, [])
y_flat = sum(y_ax, [])
Answered By - Nawra C
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.