How to plot frequency table with total row and column as heatmap?

Hi @nimrod welcome to the community.

Could you add some more information? What do you mean by margins? Maybe this gives you some ideas: