From: Tony Yu <ts...@gm...> - 2012-03-27 14:00:14
|
On Mon, Mar 26, 2012 at 7:42 PM, Tony Yu <ts...@gm...> wrote: > I'm drawing hexbins with alpha < 1 and get dark lines at the bin edges. It > turns out that setting `edgecolors = 'none'` sets the edge color to be the > same as the face color, as mentioned in the docstring: > > If ``'none'``, draws the edges in the same color as the fill > color. > This is the default, as it avoids unsightly unpainted pixels > between the hexagons. > > This behavior is a bit weird, since setting colors to 'none' usually makes > the element invisible. Wouldn't it be more consistent to let 'none' be > passed to the PolyCollection (which draws the hexbins), such that edges > aren't drawn. Then, to maintain the current behavior, change the default to > 'face'. (Of course, this wouldn't really maintain current behavior for code > that explicitly passes `edgecolors='none'`.) > > Also, if I let 'none' get passed to the PolyCollection, I don't see the > "unsightly unpainted pixels between the hexagons". Is this just a > system-dependent artifact, or is it an outdated docstring? > > Thanks, > -Tony > Just to clarify, here's an example of how I think hexbin should behave: https://github.com/tonysyu/matplotlib/commit/39e28540d30a55c18975533fe3625c47506c5908 -Tony |