From: Michael D. <md...@st...> - 2008-12-02 15:30:24
|
There is an explicit offset of one pixel on the left when it sets up a clip box in Agg. I don't know why this is there, but it dates back to 0.98.0, and earlier versions did something completely different. I can only guess it was to compensate for an earlier bug in the precise drawing of the axes rectangle. I can't explain why it would have different behavior on Windows vs. Linux, though. I have fixed this in SVN r6465 and am including a patch below (which unfortunately requires a recompile). Cheers, Mike Modified: trunk/matplotlib/src/_backend_agg.cpp =================================================================== --- trunk/matplotlib/src/_backend_agg.cpp 2008-12-01 19:35:39 UTC (rev 6465) +++ trunk/matplotlib/src/_backend_agg.cpp 2008-12-02 15:27:23 UTC (rev 6466) @@ -312,8 +312,8 @@ double l, b, r, t; if (py_convert_bbox(cliprect.ptr(), l, b, r, t)) { - rasterizer.clip_box(int(mpl_round(l)) + 1, height - int(mpl_round(b)), - int(mpl_round(r)), height - int(mpl_round(t))); + rasterizer.clip_box(int(mpl_round(l)), height - int(mpl_round(b)), + int(mpl_round(r)), height - int(mpl_round(t))); } _VERBOSE("RendererAgg::set_clipbox done"); |