Closed jhncls closed 1 year ago
I don't really like how you get a gap where the lines join:
Normally this could be handled with the capstyle
of the lines but that argument doesn't seem to be used for lines comprising the edges of a quadmesh.
Given that this is not a strictly better approach (i.e. it gets rid of one artifact but introduces a new one) and that it has the potential to surprise in other ways (e.g., your ticks almost disappear, which might not be what you're expecting), I think it's probably not a strong candidate for magical behavior.
Indeed, as often, the gritty details are more complex than what's visible at first sight. It's better to wait until matplotlib draws this quadmesh border without the disturbing gap. My example plot used the default matplotlib settings (which has ticks, unlike many seaborn settings) and a rather thick line to emphasize the difference between outer and inner lines (which sideways also emphasizes the gap at the top left).
Seaborn's examples with white grid lines and a white background are probably the preferred aesthetics, as the attention needs to go to the cell contents, not the grid.
(Tested with Seaborn 0.12.2)
When lines are drawn between cells in a heatmap (using
linewidths=
), the lines on the outside are shown thinner than the inner lines. They are clipped by the axes. It could be handy to automatically setclip_on=False
by default.