biolab / orange3

🍊 :bar_chart: :bulb: Orange: Interactive data analysis
https://orangedatamining.com
Other
4.84k stars 1.01k forks source link

Heat Map split by aspect ratio change #5642

Open robertcv opened 3 years ago

robertcv commented 3 years ago

What's your use case? When using the Split by parameter in Heat Map the size of squares representing values changes If a subgroup is smaller. You can use the Keep aspect ratio option but then this also makes the points the same height and width (which results in the plot not fitting the window) and I want just the same heights across subgroups (so that it is apparent that the second group is smallerin size).

Currently: Screenshot from 2021-10-12 18-15-56

thocevar commented 2 years ago

I managed to replicate this on the Iris dataset. Everything is fine and scales to maintain the sizes if the initial sizes are correct. However, if they are not due to large labels or dendrograms, it breaks down. What happens if you hide the labels and dendrograms?

image

I think that the row stretch factors are supposed to ensure that larger parts of the grid expand faster and in turn maintain the point sizes. This obviously breaks down if the initial sizes are not in the right proportions because of labels or dendrograms.

https://github.com/biolab/orange3/blob/2c29c7a711cebfe33c8d378571546d7f88df7c61/Orange/widgets/visualize/utils/heatmap.py#L495

robertcv commented 2 years ago

Although your example is surlily affected by label size, the same effect can be observed with smaller labels but there must be a bigger difference in the number of samples in the subgroups. Also, I don't know how to remove labels as they get automatically added when splitting rows ba a variable. In the example below I used the Iris dataset but renamed and merged setosa and versicolor into g1 and renamed verginica into g3 and selected just 12 samples. Screenshot from 2021-11-12 13-46-44