0

I am working with my genes expression dataset and created this heatmap:

On the X axis of this heatmap, I have my different cell types.

I want to have only one xtick in the center of each cell type and remove all of the other excess xticks.

Additionally, I want the last line of this heatmap to have different distinct colors for each cell type.

I searched for days for some possible solutions and tried to manipulate some of pandas and seaborn functions, but couldn't solve this problem.

It is supposed to look more like this:

Ofir Shorer
  • 446
  • 1
  • 6
  • 16
  • What about replacing all labels except one with `''` before displaying? – Let's try Apr 28 '21 at 14:56
  • From the data on this site, I analyzed it with seaborn's cluster map. Automatically the names are aggregated and displayed, so your assignment is no longer needed. I am a complete novice in this genre, so my comments may be off the mark. Here is [the site](https://www.reneshbedre.com/blog/heatmap-python.html) and official reference I used for [reference](https://seaborn.pydata.org/generated/seaborn.clustermap.html#seaborn.clustermap). – r-beginners Apr 28 '21 at 15:00
  • Thanks for your answers but both of these suggestions didn't work. I already tried using seaborn's cluster map and it had the exact same problem. Regarding the usage of the empty string, I have thousands of cells for each cell type, and for this reason python skips lots of the xticks so it can fit for the size of the heatmap. Because of that, I can't really predict where to keep the xticks and where to replace them with the empty string. – Ofir Shorer Apr 28 '21 at 16:16

0 Answers0