Replies: 6 comments
-
An example would help a lot; |
Beta Was this translation helpful? Give feedback.
-
It's just a regular invocation, no bells or whistles.
|
Beta Was this translation helpful? Give feedback.
-
It's a little unclear what you mean by "background cells" but I think you're talking about the axes grid that shows through where there is missing data? You can change you code to have ax = sns.heatmap(df)
ax.grid(False) PS even without bells or whistles it's important to provide an example because (1) other people can't see what you're looking at and the description wasn't really clear and (2) you're asking for people to help you and it will be a lot easier if you give them something to start with. |
Beta Was this translation helpful? Give feedback.
-
The grid lines sort of make up cells, similar to cells in a heatmap, just a bit shifted. I know they can be toggled off completely but this is what I'm trying to achieve: If seaborn can't do it, I'm pretty sure I'm supposed to use matplotlib.transforms.Affine2D.translate. But how do I figure out how many pixels do I need? |
Beta Was this translation helpful? Give feedback.
-
Se |
Beta Was this translation helpful? Give feedback.
-
Right. I feel dumb now. 🤦 I didn't originally plan on having the lines in the actual heatmap, just the grey background, and thus got hyperfocused on the shift/transform thing, but this is good enough. More importantly, it's nice and straightforward. Thank you :) |
Beta Was this translation helpful? Give feedback.
-
Is there a way to shift heatmap background (missing values depiction) in such a way that the background cells match alignment of the plotted cells? I tried
linewidths=1
but while it makes them look aligned in reality it splits the background cells so they are composed of 4 smaller cells.Or maybe it's possible to overlay heatmaps where the background one would plot with monocolored palette? I couldn't figure out how to create that.
Beta Was this translation helpful? Give feedback.
All reactions